diff options
author | Jiri Olsa <jolsa@kernel.org> | 2018-03-07 16:50:08 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-03-08 15:30:46 +0100 |
commit | e2091cedd51bf5306bcd5dd498d2977abfe20e88 (patch) | |
tree | 89684de454fbbb4e2d8b5f19f8632e09ac76d8d2 /tools/perf/util/header.h | |
parent | perf c2c: Use mem_info refcnt logic (diff) | |
download | linux-e2091cedd51bf5306bcd5dd498d2977abfe20e88.tar.xz linux-e2091cedd51bf5306bcd5dd498d2977abfe20e88.zip |
perf tools: Add MEM_TOPOLOGY feature to perf data file
Adding MEM_TOPOLOGY feature to perf data file,
that will carry physical memory map and its
node assignments.
The format of data in MEM_TOPOLOGY is as follows:
0 - version | for future changes
8 - block_size_bytes | /sys/devices/system/memory/block_size_bytes
16 - count | number of nodes
For each node we store map of physical indexes for
each node:
32 - node id | node index
40 - size | size of bitmap
48 - bitmap | bitmap of memory indexes that belongs to node
| /sys/devices/system/node/node<NODE>/memory<INDEX>
The MEM_TOPOLOGY could be displayed with following
report command:
$ perf report --header-only -I
...
# memory nodes (nr 1, block size 0x8000000):
# 0 [7G]: 0-23,32-69
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180307155020.32613-8-jolsa@kernel.org
[ Rename 'index' to 'idx', as this breaks the build in rhel5, 6 and other systems where this is used by glibc headers ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | tools/perf/util/header.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/header.h b/tools/perf/util/header.h index 942bdec6d70d..90d4577a92dc 100644 --- a/tools/perf/util/header.h +++ b/tools/perf/util/header.h @@ -36,6 +36,7 @@ enum { HEADER_STAT, HEADER_CACHE, HEADER_SAMPLE_TIME, + HEADER_MEM_TOPOLOGY, HEADER_LAST_FEATURE, HEADER_FEAT_BITS = 256, }; |