* [patch] perf.data documentation clarify HEADER_SAMPLE_TOPOLOGY format
@ 2019-08-01 18:30 Vince Weaver
2019-08-02 13:14 ` Jiri Olsa
2019-08-15 9:35 ` [tip:perf/core] perf.data documentation: Clarify " tip-bot for Vince Weaver
0 siblings, 2 replies; 4+ messages in thread
From: Vince Weaver @ 2019-08-01 18:30 UTC (permalink / raw)
To: linux-kernel
Cc: Arnaldo Carvalho de Melo, Peter Zijlstra, Ingo Molnar,
Alexander Shishkin, Jiri Olsa, Namhyung Kim, Adrian Hunter,
Andi Kleen, Chong Jiang, Simon Que
The perf.data file format documentation for HEADER_SAMPLE_TOPOLOGY
specifies the layout in a confusing manner that doesn't match the rest of
the document. This patch attempts to describe things consistent with the
rest of the file.
Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
diff --git a/tools/perf/Documentation/perf.data-file-format.txt b/tools/perf/Documentation/perf.data-file-format.txt
index 5f54feb19977..6a7dceaae709 100644
--- a/tools/perf/Documentation/perf.data-file-format.txt
+++ b/tools/perf/Documentation/perf.data-file-format.txt
@@ -298,16 +298,21 @@ 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:
-
- 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>
+ u64 version; // Currently 1
+ u64 block_size_bytes; // /sys/devices/system/memory/block_size_bytes
+ u64 count; // number of nodes
+
+struct memory_node {
+ u64 node_id; // node index
+ u64 size; // size of bitmap
+ struct bitmap {
+ /* size of bitmap again */
+ u64 bitmapsize;
+ /* bitmap of memory indexes that belongs to node */
+ /* /sys/devices/system/node/node<NODE>/memory<INDEX> */
+ u64 entries[(bitmapsize/64)+1];
+ }
+}[count];
The MEM_TOPOLOGY can be displayed with following command:
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [patch] perf.data documentation clarify HEADER_SAMPLE_TOPOLOGY format
2019-08-01 18:30 [patch] perf.data documentation clarify HEADER_SAMPLE_TOPOLOGY format Vince Weaver
@ 2019-08-02 13:14 ` Jiri Olsa
2019-08-13 14:20 ` Arnaldo Carvalho de Melo
2019-08-15 9:35 ` [tip:perf/core] perf.data documentation: Clarify " tip-bot for Vince Weaver
1 sibling, 1 reply; 4+ messages in thread
From: Jiri Olsa @ 2019-08-02 13:14 UTC (permalink / raw)
To: Vince Weaver
Cc: linux-kernel, Arnaldo Carvalho de Melo, Peter Zijlstra,
Ingo Molnar, Alexander Shishkin, Namhyung Kim, Adrian Hunter,
Andi Kleen, Chong Jiang, Simon Que
On Thu, Aug 01, 2019 at 02:30:43PM -0400, Vince Weaver wrote:
>
> The perf.data file format documentation for HEADER_SAMPLE_TOPOLOGY
> specifies the layout in a confusing manner that doesn't match the rest of
> the document. This patch attempts to describe things consistent with the
> rest of the file.
>
> Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
>
> diff --git a/tools/perf/Documentation/perf.data-file-format.txt b/tools/perf/Documentation/perf.data-file-format.txt
> index 5f54feb19977..6a7dceaae709 100644
> --- a/tools/perf/Documentation/perf.data-file-format.txt
> +++ b/tools/perf/Documentation/perf.data-file-format.txt
> @@ -298,16 +298,21 @@ 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:
> -
> - 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>
> + u64 version; // Currently 1
> + u64 block_size_bytes; // /sys/devices/system/memory/block_size_bytes
> + u64 count; // number of nodes
> +
> +struct memory_node {
> + u64 node_id; // node index
> + u64 size; // size of bitmap
> + struct bitmap {
> + /* size of bitmap again */
> + u64 bitmapsize;
> + /* bitmap of memory indexes that belongs to node */
> + /* /sys/devices/system/node/node<NODE>/memory<INDEX> */
> + u64 entries[(bitmapsize/64)+1];
> + }
> +}[count];
Acked-by: Jiri Olsa <jolsa@kernel.org>
thanks for doing this,
jirka
>
> The MEM_TOPOLOGY can be displayed with following command:
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] perf.data documentation clarify HEADER_SAMPLE_TOPOLOGY format
2019-08-02 13:14 ` Jiri Olsa
@ 2019-08-13 14:20 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-08-13 14:20 UTC (permalink / raw)
To: Jiri Olsa
Cc: Vince Weaver, linux-kernel, Peter Zijlstra, Ingo Molnar,
Alexander Shishkin, Namhyung Kim, Adrian Hunter, Andi Kleen,
Chong Jiang, Simon Que
Em Fri, Aug 02, 2019 at 03:14:40PM +0200, Jiri Olsa escreveu:
> On Thu, Aug 01, 2019 at 02:30:43PM -0400, Vince Weaver wrote:
> > + }
> > +}[count];
>
> Acked-by: Jiri Olsa <jolsa@kernel.org>
>
> thanks for doing this,
Thanks, applied.
- Arnaldo
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:perf/core] perf.data documentation: Clarify HEADER_SAMPLE_TOPOLOGY format
2019-08-01 18:30 [patch] perf.data documentation clarify HEADER_SAMPLE_TOPOLOGY format Vince Weaver
2019-08-02 13:14 ` Jiri Olsa
@ 2019-08-15 9:35 ` tip-bot for Vince Weaver
1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Vince Weaver @ 2019-08-15 9:35 UTC (permalink / raw)
To: linux-tip-commits
Cc: ak, chongjiang, linux-kernel, jolsa, sque, hpa, vincent.weaver,
adrian.hunter, namhyung, acme, mingo, peterz, tglx,
alexander.shishkin
Commit-ID: 3143906c2770778d89b730e0342b745d1b4a8303
Gitweb: https://git.kernel.org/tip/3143906c2770778d89b730e0342b745d1b4a8303
Author: Vince Weaver <vincent.weaver@maine.edu>
AuthorDate: Thu, 1 Aug 2019 14:30:43 -0400
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 14 Aug 2019 10:59:59 -0300
perf.data documentation: Clarify HEADER_SAMPLE_TOPOLOGY format
The perf.data file format documentation for HEADER_SAMPLE_TOPOLOGY
specifies the layout in a confusing manner that doesn't match the rest
of the document. This patch attempts to describe things consistent with
the rest of the file.
Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Chong Jiang <chongjiang@chromium.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Simon Que <sque@chromium.org>
Link: http://lkml.kernel.org/r/alpine.DEB.2.21.1908011425240.14303@macbook-air
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/Documentation/perf.data-file-format.txt | 25 +++++++++++++---------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/tools/perf/Documentation/perf.data-file-format.txt b/tools/perf/Documentation/perf.data-file-format.txt
index d030c87ed9f5..b0152e1095c5 100644
--- a/tools/perf/Documentation/perf.data-file-format.txt
+++ b/tools/perf/Documentation/perf.data-file-format.txt
@@ -298,16 +298,21 @@ 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:
-
- 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>
+ u64 version; // Currently 1
+ u64 block_size_bytes; // /sys/devices/system/memory/block_size_bytes
+ u64 count; // number of nodes
+
+struct memory_node {
+ u64 node_id; // node index
+ u64 size; // size of bitmap
+ struct bitmap {
+ /* size of bitmap again */
+ u64 bitmapsize;
+ /* bitmap of memory indexes that belongs to node */
+ /* /sys/devices/system/node/node<NODE>/memory<INDEX> */
+ u64 entries[(bitmapsize/64)+1];
+ }
+}[count];
The MEM_TOPOLOGY can be displayed with following command:
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-08-15 9:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-01 18:30 [patch] perf.data documentation clarify HEADER_SAMPLE_TOPOLOGY format Vince Weaver
2019-08-02 13:14 ` Jiri Olsa
2019-08-13 14:20 ` Arnaldo Carvalho de Melo
2019-08-15 9:35 ` [tip:perf/core] perf.data documentation: Clarify " tip-bot for Vince Weaver
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).