linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Vince Weaver <vincent.weaver@maine.edu>
Cc: linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Andi Kleen <ak@linux.intel.com>,
	Chong Jiang <chongjiang@chromium.org>,
	Simon Que <sque@chromium.org>
Subject: Re: [patch] perf.data documentation clarify HEADER_SAMPLE_TOPOLOGY format
Date: Fri, 2 Aug 2019 15:14:40 +0200	[thread overview]
Message-ID: <20190802131440.GC27223@krava> (raw)
In-Reply-To: <alpine.DEB.2.21.1908011425240.14303@macbook-air>

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:
>  

  reply	other threads:[~2019-08-02 13:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-01 18:30 [patch] perf.data documentation clarify HEADER_SAMPLE_TOPOLOGY format Vince Weaver
2019-08-02 13:14 ` Jiri Olsa [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190802131440.GC27223@krava \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=chongjiang@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=sque@chromium.org \
    --cc=vincent.weaver@maine.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).