Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp15295ybh; Fri, 2 Aug 2019 17:03:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/UqtnXHPNulnHzUc7xdz4rYkp3EJq38aYTjtmo5wOul/3oyVRTdT9/R6CziZYql34oU32 X-Received: by 2002:a17:902:6ac6:: with SMTP id i6mr134419781plt.233.1564790580390; Fri, 02 Aug 2019 17:03:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564790580; cv=none; d=google.com; s=arc-20160816; b=cC+42igiMkblqPCQnsiZAeegXDxRmjuBf936ZKZ1MNtSgWF41E4UfTVZWYnzlPdkPf 5Vez1rSdBP76lT4hPB8zPFNVNxC7h0RdK3WAcD2pc1cj3cXLn6fNhJdGsy6PcpihG2Qh YpyDJbANs9M6bjT0eH24xhV7xBiEXONK1a2XazfdQGzL+h07mlvL0ibIWibbrmPjTCDm 1rLSHThazJ2XWEUrDluzFC0Ec8Yy+KiaeZcSL/NLrYNacE00QnKi/sUuD/yP7VukPW8C cCn++PIKRi4uRs1sWecaMt24HYyMy40XL0kgFOPnO17O3UKxwZsgKl3XzAEKxvZ4tmj8 GQwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=/ZXcCZUvof/oJlb7K+rWg/UaVaJFyY8Ub76ZOJ2zZ28=; b=DP5NiH6m+j+FAYqK4vfV/IjatD3kjmBB8AAWgB9aUl74ukymdLEKLtPwqM7p41LXLT 3IGvnHaZaTcSKrWYkdLhnmt665YbiKKvsBDYqF3DLcFrHZ9ZIJmnzqcj5XEuzJ2LQM7w mn93oSJ/KBg7QmNDlnYBe7uNQMcNR+BhVa9xAE9uWuVwLFE59SFPJut+rCKhtlZsY0w6 0CgvCwK7MaA1KuAwQrgQ0co27TylHAIKeNOHm/TYvy3icPbzoJh5rnxG6c5jV2eqTRdH bYBji6MTEz7dCzOCY1PnljAuOzGyxdiXJ+0VlulPsBhrUy+FuKyJRl8TSwp8iRqI9rgn xbBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m3si40320237pgq.414.2019.08.02.17.02.45; Fri, 02 Aug 2019 17:03:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390683AbfHBNOo (ORCPT + 99 others); Fri, 2 Aug 2019 09:14:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48120 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726997AbfHBNOn (ORCPT ); Fri, 2 Aug 2019 09:14:43 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5C58E307D97F; Fri, 2 Aug 2019 13:14:43 +0000 (UTC) Received: from krava (ovpn-204-20.brq.redhat.com [10.40.204.20]) by smtp.corp.redhat.com (Postfix) with SMTP id 1F3575D704; Fri, 2 Aug 2019 13:14:40 +0000 (UTC) Date: Fri, 2 Aug 2019 15:14:40 +0200 From: Jiri Olsa To: Vince Weaver Cc: linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Namhyung Kim , Adrian Hunter , Andi Kleen , Chong Jiang , Simon Que Subject: Re: [patch] perf.data documentation clarify HEADER_SAMPLE_TOPOLOGY format Message-ID: <20190802131440.GC27223@krava> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Fri, 02 Aug 2019 13:14:43 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > 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/memory > + 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/memory */ > + u64 entries[(bitmapsize/64)+1]; > + } > +}[count]; Acked-by: Jiri Olsa thanks for doing this, jirka > > The MEM_TOPOLOGY can be displayed with following command: >