From: Ravi Bangoria <ravi.bangoria@amd.com>
To: <acme@kernel.org>
Cc: <ravi.bangoria@amd.com>, <irogers@google.com>, <jolsa@kernel.org>,
<namhyung@kernel.org>, <mark.rutland@arm.com>,
<peterz@infradead.org>, <adrian.hunter@intel.com>,
<kan.liang@linux.intel.com>, <james.clark@arm.com>,
<alisaidi@amazon.com>, <leo.yan@linaro.org>,
<maddy@linux.ibm.com>, <linux-perf-users@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <sandipan.das@amd.com>,
<ananth.narayan@amd.com>, <santosh.shukla@amd.com>
Subject: [PATCH 1/4] perf pmus: Describe semantics of 'core_pmus' and 'other_pmus'
Date: Tue, 13 Jun 2023 15:25:03 +0530 [thread overview]
Message-ID: <20230613095506.547-2-ravi.bangoria@amd.com> (raw)
In-Reply-To: <20230613095506.547-1-ravi.bangoria@amd.com>
'core_pmus' and 'other_pmus' are independent of hw core pmu and uncore
pmus. For example, AMD IBS PMUs are present in each SMT-thread but they
belongs to 'other_pmus'. Add a comment describing what these list
contains and how they are treated.
Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
---
tools/perf/util/pmus.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/tools/perf/util/pmus.c b/tools/perf/util/pmus.c
index e1d0a93147e5..e505d2fef828 100644
--- a/tools/perf/util/pmus.c
+++ b/tools/perf/util/pmus.c
@@ -12,6 +12,19 @@
#include "pmu.h"
#include "print-events.h"
+/*
+ * core_pmus: A PMU belongs to core_pmus if it's name is "cpu" or it's sysfs
+ * directory contains "cpus" file. All PMUs belonging to core_pmus
+ * must have pmu->is_core=1. If there are more than one PMUs in
+ * this list, perf interprets it as a heterogeneous platform.
+ * (FWIW, certain ARM platforms having heterogeneous cores uses
+ * homogeneous PMU in which case it will be treated as homogeneous
+ * platform by perf because core_pmus will have only one entry.)
+ * other_pmus: All other PMUs which are not part of core_pmus list. Does not
+ * matter whether it is a per SMT-thread or outside of the core in
+ * hw. i.e. PMUs belonging to other_pmus must have pmu->is_core=0
+ * but pmu->is_uncore could be 0 or 1.
+ */
static LIST_HEAD(core_pmus);
static LIST_HEAD(other_pmus);
static bool read_sysfs_core_pmus;
--
2.40.1
next prev parent reply other threads:[~2023-06-13 9:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-13 9:55 [PATCH 0/4] perf mem amd: Fix few logic bugs Ravi Bangoria
2023-06-13 9:55 ` Ravi Bangoria [this message]
2023-06-13 9:55 ` [PATCH 2/4] perf tool x86: Consolidate is_amd check into single function Ravi Bangoria
2023-06-13 19:49 ` Arnaldo Carvalho de Melo
2023-06-13 19:49 ` Ian Rogers
2023-06-13 20:28 ` Arnaldo Carvalho de Melo
2023-06-13 9:55 ` [PATCH 3/4] perf mem amd: Fix perf_pmus__num_mem_pmus() Ravi Bangoria
2023-06-13 15:25 ` Ian Rogers
2023-06-14 3:49 ` Ravi Bangoria
2023-06-13 9:55 ` [PATCH 4/4] perf mem amd: Scan all PMUs instead of just core ones Ravi Bangoria
2023-06-13 15:34 ` Ian Rogers
2023-06-14 3:58 ` Ravi Bangoria
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=20230613095506.547-2-ravi.bangoria@amd.com \
--to=ravi.bangoria@amd.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alisaidi@amazon.com \
--cc=ananth.narayan@amd.com \
--cc=irogers@google.com \
--cc=james.clark@arm.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=leo.yan@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=maddy@linux.ibm.com \
--cc=mark.rutland@arm.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=sandipan.das@amd.com \
--cc=santosh.shukla@amd.com \
/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
all inboxes | Powered by JetHome®