From: "Liang, Kan" <kan.liang@linux.intel.com>
To: Ian Rogers <irogers@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
Zhengjun Xing <zhengjun.xing@linux.intel.com>,
Ravi Bangoria <ravi.bangoria@amd.com>,
Adrian Hunter <adrian.hunter@intel.com>,
"Steinar H. Gunderson" <sesse@google.com>,
Qi Liu <liuqi115@huawei.com>, Kim Phillips <kim.phillips@amd.com>,
Florian Fischer <florian.fischer@muhq.space>,
James Clark <james.clark@arm.com>,
Suzuki Poulouse <suzuki.poulose@arm.com>,
Sean Christopherson <seanjc@google.com>,
Leo Yan <leo.yan@linaro.org>,
John Garry <john.g.garry@oracle.com>,
Kajol Jain <kjain@linux.ibm.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH v1 05/10] perf evsel: Limit in group test to CPUs
Date: Thu, 2 Mar 2023 10:24:42 -0500 [thread overview]
Message-ID: <b7597055-5fb3-c253-f9b7-190d3daf105e@linux.intel.com> (raw)
In-Reply-To: <20230302041211.852330-6-irogers@google.com>
On 2023-03-01 11:12 p.m., Ian Rogers wrote:
> Don't just match on the event name, restict based on the PMU too.
>
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
> tools/perf/arch/x86/util/evsel.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tools/perf/arch/x86/util/evsel.c b/tools/perf/arch/x86/util/evsel.c
> index ea3972d785d1..580b0a172136 100644
> --- a/tools/perf/arch/x86/util/evsel.c
> +++ b/tools/perf/arch/x86/util/evsel.c
> @@ -61,6 +61,9 @@ bool arch_evsel__must_be_in_group(const struct evsel *evsel)
> if (!evsel__sys_has_perf_metrics(evsel))
> return false;
>
> + if (evsel->pmu_name && strncmp(evsel->pmu_name, "cpu", 3))
> + return false;
I'm not sure why we want to check the pmu name. It seems better to move
it into evsel__sys_has_perf_metrics(), since perf_metrics is a core PMU
only feature.
I think the strncmp(evsel->pmu_name, "cpu", 3) is to check whether it is
a core PMU. It is also used in other places. I think it's better to
factor out it, e.g., arch_evsel__is_core_pmu(). It will deliver a clear
message of what we are doing here.
Thanks,
Kan
> +
> return evsel->name &&
> (strcasestr(evsel->name, "slots") ||
> strcasestr(evsel->name, "topdown"));
next prev parent reply other threads:[~2023-03-02 15:24 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-02 4:12 [PATCH v1 00/10] Better fixes for grouping of events Ian Rogers
2023-03-02 4:12 ` [PATCH v1 01/10] libperf evlist: Avoid a use of evsel idx Ian Rogers
2023-03-02 14:33 ` Arnaldo Carvalho de Melo
2023-03-02 4:12 ` [PATCH v1 02/10] perf stat: Don't remove all grouped events when CPU maps disagree Ian Rogers
2023-03-02 14:33 ` Arnaldo Carvalho de Melo
2023-03-02 4:12 ` [PATCH v1 03/10] perf record: Early auxtrace initialization before event parsing Ian Rogers
2023-03-02 14:32 ` Arnaldo Carvalho de Melo
2023-03-02 16:05 ` Ian Rogers
2023-03-02 4:12 ` [PATCH v1 04/10] perf stat: Modify the group test Ian Rogers
2023-03-02 14:34 ` Arnaldo Carvalho de Melo
2023-03-02 16:10 ` Ian Rogers
2023-03-02 4:12 ` [PATCH v1 05/10] perf evsel: Limit in group test to CPUs Ian Rogers
2023-03-02 14:35 ` Arnaldo Carvalho de Melo
2023-03-02 15:24 ` Liang, Kan [this message]
2023-03-02 19:38 ` Ian Rogers
2023-03-02 20:28 ` Liang, Kan
2023-03-02 4:12 ` [PATCH v1 06/10] perf evsel: Allow const evsel for certain accesses Ian Rogers
2023-03-02 14:36 ` Arnaldo Carvalho de Melo
2023-03-02 4:12 ` [PATCH v1 07/10] perf evsel: Add function to compute pmu_name Ian Rogers
2023-03-02 14:39 ` Arnaldo Carvalho de Melo
2023-03-02 16:13 ` Ian Rogers
2023-03-02 4:12 ` [PATCH v1 08/10] perf parse-events: Pass ownership of the group name Ian Rogers
2023-03-02 14:45 ` Arnaldo Carvalho de Melo
2023-03-02 4:12 ` [PATCH v1 09/10] perf parse-events: Sort and group parsed events Ian Rogers
2023-03-02 14:51 ` Arnaldo Carvalho de Melo
2023-03-02 17:20 ` Ian Rogers
2023-03-02 4:12 ` [PATCH v1 10/10] perf evsel: Remove use_uncore_alias Ian Rogers
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=b7597055-5fb3-c253-f9b7-190d3daf105e@linux.intel.com \
--to=kan.liang@linux.intel.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=eranian@google.com \
--cc=florian.fischer@muhq.space \
--cc=irogers@google.com \
--cc=james.clark@arm.com \
--cc=john.g.garry@oracle.com \
--cc=jolsa@kernel.org \
--cc=kim.phillips@amd.com \
--cc=kjain@linux.ibm.com \
--cc=leo.yan@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=liuqi115@huawei.com \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=ravi.bangoria@amd.com \
--cc=seanjc@google.com \
--cc=sesse@google.com \
--cc=suzuki.poulose@arm.com \
--cc=zhengjun.xing@linux.intel.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;
as well as URLs for NNTP newsgroup(s).