Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1968887ybl; Thu, 15 Aug 2019 04:24:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqwv/+gXCnaSjX9g/ubHQwHUwsKt4kMUIvfZh54i5cKWDO/rtnLwOoW+yWOBblLFKYcxJlUe X-Received: by 2002:a62:aa13:: with SMTP id e19mr4700959pff.37.1565868245960; Thu, 15 Aug 2019 04:24:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565868245; cv=none; d=google.com; s=arc-20160816; b=Bl7U6MY7HVXadwkFlFuAFphvJ4jiSnjebBmdzAmQRORiaY4vANcDHGi/U6b0N9YkgC Pysi0dydwSBQnzOVEy5WDUgLS6/pDxVkszcRTN9Ai8gXUBiTIhXcmQ6kJHLZWvuAKZmk SvzLJcNfLHCs4toJjcyI4s+76HWoqTXdMby2Ag6qBhyyiWt+w6HZzfjKqWuhOYGzOhV8 HKUwS01r8R3qZoB4TBrtlSjAIee+ygc9N10D1E6Ual8odsJNE8UQ/XdyxKAFca4b4qtz SBJjm2X4o0sMC+3VBUuH7Y3aX9e2t8dyLPrQbkPUQJV+ZpB8B7l3Cry/MNuCiB5/kawZ ZSJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:dkim-signature:dkim-filter; bh=dm16HIFA/tXkgLfMM0ox8GYhHgm8U+WBAdBwW0jWldM=; b=efJw0sS9156kBPwTl2IUtav5dOhfWMrCl1vSdPYq5YbMYyDnXnKWYzZaEa6DF4rwuF pzWGV8wxWeyIZhEQ0J40KjwhaUAePORJRCvV9OGPU4pC3q0MittzpXMaDakpOSM3yblC QtzuFCOBezQoQ4aeCDwYEKRF9RwdMGPvbQLH+RvFmYLtCD/T2xRwDZ6g98Xm5ZwFD2XB alI02vw/kKGaVpyuU0cBCHThdboS/qII3yTtSBmEl+NmuAOuH5ITFLRRZiJuMKLHF8/5 F6fCELQodT+g3i6EIL3thbXDVepnKibK81tHxl2Ff0p+/nlhIPokvQaJMLVe2uguH2Cg NCYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2019071901 header.b=uRvTfM3C; 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=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o21si1691730pgd.223.2019.08.15.04.23.45; Thu, 15 Aug 2019 04:24:05 -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; dkim=pass header.i=@zytor.com header.s=2019071901 header.b=uRvTfM3C; 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=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731229AbfHOJfb (ORCPT + 99 others); Thu, 15 Aug 2019 05:35:31 -0400 Received: from terminus.zytor.com ([198.137.202.136]:60813 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730213AbfHOJfb (ORCPT ); Thu, 15 Aug 2019 05:35:31 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x7F9ZF2O2275041 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 15 Aug 2019 02:35:16 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 terminus.zytor.com x7F9ZF2O2275041 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2019071901; t=1565861716; bh=dm16HIFA/tXkgLfMM0ox8GYhHgm8U+WBAdBwW0jWldM=; h=Date:From:Cc:Reply-To:In-Reply-To:References:To:Subject:From; b=uRvTfM3CiuSckvF5rP+ZwyiI0iT0YtszK1q8XlSORTkROf+6pulYhXMxBF1GjOIN+ 6DKJ/sRtndOOq/GBfK9uBqSG6gUXeHM7c4Ily14Z6jWlzSl+pquISmsQhmv2VpNSpA qSAxze+FOfqZyEHJbGs7Q2SldKFaMpCwrNDoevwb27mVys38kbjDadxr/Wuw6+xMv7 pkHc8F+93a2UOJOdIuSlOzl1JIgYcbQ622eVqV24XboXOav6vyE0r2HB+3O8TkQq0t MF49709HdCEHniHEuFnUwjplx4aEZ0wKp2el+WA4Lvge/9+5kAemZvYuhH78HFEqYb k4BImthz66IPw== Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x7F9ZFBv2275035; Thu, 15 Aug 2019 02:35:15 -0700 Date: Thu, 15 Aug 2019 02:35:15 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Vince Weaver Message-ID: Cc: ak@linux.intel.com, chongjiang@chromium.org, linux-kernel@vger.kernel.org, jolsa@kernel.org, sque@chromium.org, hpa@zytor.com, vincent.weaver@maine.edu, adrian.hunter@intel.com, namhyung@kernel.org, acme@redhat.com, mingo@kernel.org, peterz@infradead.org, tglx@linutronix.de, alexander.shishkin@linux.intel.com Reply-To: vincent.weaver@maine.edu, adrian.hunter@intel.com, hpa@zytor.com, peterz@infradead.org, alexander.shishkin@linux.intel.com, tglx@linutronix.de, namhyung@kernel.org, mingo@kernel.org, acme@redhat.com, chongjiang@chromium.org, ak@linux.intel.com, sque@chromium.org, jolsa@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf.data documentation: Clarify HEADER_SAMPLE_TOPOLOGY format Git-Commit-ID: 3143906c2770778d89b730e0342b745d1b4a8303 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_96_Q,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 3143906c2770778d89b730e0342b745d1b4a8303 Gitweb: https://git.kernel.org/tip/3143906c2770778d89b730e0342b745d1b4a8303 Author: Vince Weaver AuthorDate: Thu, 1 Aug 2019 14:30:43 -0400 Committer: Arnaldo Carvalho de Melo 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 Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Chong Jiang Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Simon Que Link: http://lkml.kernel.org/r/alpine.DEB.2.21.1908011425240.14303@macbook-air Signed-off-by: Arnaldo Carvalho de Melo --- 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/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]; The MEM_TOPOLOGY can be displayed with following command: