perf data: Fix perf.data documentation for HEADER_CPU_TOPOLOGY
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: 36edfb940195b62c79bc8b148720c8275659a8c7 Gitweb: https://git.kernel.org/tip/36edfb940195b62c79bc8b148720c8275659a8c7 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Thu, 6 Jun 2019 17:03:18 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Mon, 10 Jun 2019 16:20:11 -0300
perf data: Fix perf.data documentation for HEADER_CPU_TOPOLOGY
The 'die' info isn't in the same array as core and socket ids, and we missed the 'dies' string list, that comes right after the 'core' + 'socket' id variable length array, followed by the VLA for the dies.
Cc Adrian Hunter <[email protected]>
Cc Andi Kleen <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Kan Liang <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Peter Zijlstra <[email protected]>
Fixes c9cb12c5ba08 ("perf header: Add die information in CPU topology")
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/Documentation/perf.data-file-format.txt | 29 ++++++++++++++++------ 1 file changed, 22 insertions(+), 7 deletions(-)
tools/perf/Documentation/perf.data-file-format.txt +22 -7
@@ -151,20 +151,35 @@ struct { HEADER_CPU_TOPOLOGY = 13, -String lists defining the core and CPU threads topology. -The string lists are followed by a variable length array -which contains core_id, die_id (for x86) and socket_id of each cpu. -The number of entries can be determined by the size of the -section minus the sizes of both string lists. - struct { + /* + * First revision of HEADER_CPU_TOPOLOGY + * + * See 'struct perf_header_string_list' definition earlier + * in this file. + */ + struct perf_header_string_list cores; /* Variable length */ struct perf_header_string_list threads; /* Variable length */ + + /* + * Second revision of HEADER_CPU_TOPOLOGY, older tools + * will not consider what comes next + */ + struct { uint32_t core_id; - uint32_t die_id; uint32_t socket_id; } cpus[nr]; /* Variable length records */ + /* 'nr' comes from previously processed HEADER_NRCPUS's nr_cpu_avail */ + + /* + * Third revision of HEADER_CPU_TOPOLOGY, older tools + * will not consider what comes next + */ + + struct perf_header_string_list dies; /* Variable length */ + uint32_t die_id[nr_cpus_avail]; /* from previously processed HEADER_NR_CPUS, VLA */ }; Example: