linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf: update perf.data file format documentation
@ 2019-02-15 18:28 Jonas Rabenstein
  2019-02-17 23:22 ` Jiri Olsa
  0 siblings, 1 reply; 13+ messages in thread
From: Jonas Rabenstein @ 2019-02-15 18:28 UTC (permalink / raw)
  To: linux-perf-users
  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

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 <jonas.rabenstein@studium.uni-erlangen.de>
---
 .../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


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-02-28  7:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-15 18:28 [PATCH] perf: update perf.data file format documentation Jonas Rabenstein
2019-02-17 23:22 ` Jiri Olsa
2019-02-18  9:04   ` Jonas Rabenstein
2019-02-18 12:46   ` Arnaldo Carvalho de Melo
2019-02-18 14:02     ` [PATCH] perf: fix HEADER_CMDLINE description in perf.data documentation Jonas Rabenstein
2019-02-19 14:04       ` Jiri Olsa
2019-02-19 15:24         ` Arnaldo Carvalho de Melo
2019-02-19 15:45           ` Jonas Rabenstein
2019-02-19 15:45             ` [PATCH] perf: fix documentation of the Flags section in perf.data Jonas Rabenstein
2019-02-28  7:41               ` [tip:perf/core] perf doc: Fix " tip-bot for Jonas Rabenstein
2019-02-28  7:41             ` [tip:perf/core] perf doc: Fix HEADER_CMDLINE description in perf.data documentation tip-bot for Jonas Rabenstein
2019-02-18 14:18   ` [PATCH] perf: fix documentation of the Flags section in perf.data Jonas Rabenstein
2019-02-19 14:04     ` Jiri Olsa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).