Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp209984imj; Fri, 15 Feb 2019 21:56:57 -0800 (PST) X-Google-Smtp-Source: AHgI3IaBqkLbeQh74jDyWWU//sChXftXYLrbwuoDvKjOhvmw0sBAfsDgx3VE6Ld/nH0wl4d8+OMz X-Received: by 2002:a65:6392:: with SMTP id h18mr8910367pgv.107.1550296617847; Fri, 15 Feb 2019 21:56:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550296617; cv=none; d=google.com; s=arc-20160816; b=oGCNCbG2prTb2hD9UHSkrr+JNDQHC9ZT5H//rG/Y5Dt0dxN+uqt5durEB/aey+ktR6 qXS6DDqX9/kclGOcD0MZQ1WLiWgzIjyahf3huha5o6PwcHPJpQ1lkCVZg1h9kGTkSBKM 6ktkJL7pnnxjb4xGjJspZxx6ku5B13aJ2bAQgh/tRsNiAmKSWARosykYIxMmErbv7Rd8 ZjEZyCvPpDIbLpLurYnj8FK9eOj86L2TsHI8mjO5nwtzrC/IBfDdQVziJZZLP8+Wj8xH QlNP7mgn+Ujgj1ppDbiTxrBIkWYviWmyFr8jgDNMsuwr5zPDz5YdQ2MziYn4Xz1IIqOC xDFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=6JMhHy3vnIkNXjQ6jZIDeSeQQ/gIB0vMagiUsAwGMfI=; b=Ponhp+H7cq7TuDGPCc/bL2EbgPannY9ioRgOMaZZfU8F07JGEIavGrdvO5I//dNyYg wYX6EO6qaTrpBwIl4woO4r6qDtKY4h6SxeH4zl0TXUbchsL2y8EzEZo6Y7MQOPxtnY3B 39aa2p202sqc29EyEC8Ym/ZRTNF+aoSxtQ8z2qHOFEbbEuI7f/T0esDYlx3n7GDPrKrA qySysHjXneqSSQoXf5jiV9hMp0dO6MmcjoK8FswqufTkC/UoXh1Qddxob99jR83RbOgD 6Zi1Hyx9Ko3oaLoAVAMSMhlGqZPh8MgsJgYOBTbmIVL/x6T78hhGM7Ke/CwbYDAI/NaB gzXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p5si7401925pls.338.2019.02.15.21.56.41; Fri, 15 Feb 2019 21:56:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390376AbfBOShq (ORCPT + 99 others); Fri, 15 Feb 2019 13:37:46 -0500 Received: from mx-rz-1.rrze.uni-erlangen.de ([131.188.11.20]:59748 "EHLO mx-rz-1.rrze.uni-erlangen.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388116AbfBOShq (ORCPT ); Fri, 15 Feb 2019 13:37:46 -0500 X-Greylist: delayed 551 seconds by postgrey-1.27 at vger.kernel.org; Fri, 15 Feb 2019 13:37:45 EST Received: from mx-rz-smart.rrze.uni-erlangen.de (mx-rz-smart.rrze.uni-erlangen.de [IPv6:2001:638:a000:1025::1e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx-rz-1.rrze.uni-erlangen.de (Postfix) with ESMTPS id 441MG86q5jz8vB3; Fri, 15 Feb 2019 19:28:32 +0100 (CET) Authentication-Results: mx-rz-1.rrze.uni-erlangen.de; dkim=none reason="no signature"; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Virus-Scanned: amavisd-new at boeck2.rrze.uni-erlangen.de (RRZE) X-RRZE-Flag: Not-Spam X-RRZE-Submit-IP: 93.217.154.217 Received: from fau.de (p5DD99AD9.dip0.t-ipconnect.de [93.217.154.217]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: U2FsdGVkX19ITf61O2P3j8Vrxl4taMRLsPw/0Jq1wYk=) by smtp-auth.uni-erlangen.de (Postfix) with ESMTPSA id 441MG64fvQz8tZr; Fri, 15 Feb 2019 19:28:30 +0100 (CET) From: Jonas Rabenstein To: linux-perf-users@vger.kernel.org Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Andi Kleen , Thomas Richter , Stephane Eranian , Jonas Rabenstein , linux-kernel@vger.kernel.org Subject: [PATCH] perf: update perf.data file format documentation Date: Fri, 15 Feb 2019 19:28:23 +0100 Message-Id: <20190215182823.303-1-jonas.rabenstein@studium.uni-erlangen.de> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I found that the documentation of the flags section is some how different from the actual format used and expected by the perf tools. In this patch the according section of the file format documentation is updated to conform to the expectations of the perf tool suite. Signed-off-by: Jonas Rabenstein --- .../perf/Documentation/perf.data-file-format.txt | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tools/perf/Documentation/perf.data-file-format.txt b/tools/perf/Documentation/perf.data-file-format.txt index dfb218feaad9..6ea199f28330 100644 --- a/tools/perf/Documentation/perf.data-file-format.txt +++ b/tools/perf/Documentation/perf.data-file-format.txt @@ -43,13 +43,10 @@ struct perf_file_section { Flags section: -The header is followed by different optional headers, described by the bits set -in flags. Only headers for which the bit is set are included. Each header -consists of a perf_file_section located after the initial header. -The respective perf_file_section points to the data of the additional -header and defines its size. - -Some headers consist of strings, which are defined like this: +The Flags section is placed directly after the data section and consists of a +variable amount of information described by the flags-bitset in the perf_header. +A lot of the headers in the Flags section are simple strings and are represented +like this: struct perf_header_string { uint32_t len; @@ -82,7 +79,7 @@ assigned by the linker to an executable. struct build_id_event { struct perf_event_header header; pid_t pid; - uint8_t build_id[24]; + uint8_t build_id[PERF_ALIGN(24, sizeof(u64))]; char filename[header.size - offsetof(struct build_id_event, filename)]; }; @@ -131,7 +128,7 @@ An uint64_t with the total memory in bytes. HEADER_CMDLINE = 11, -A perf_header_string with the perf command line used to collect the data. +A perf_header_string_list with the perf arg-vector used to collect the data. HEADER_EVENT_DESC = 12, -- 2.17.1