From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
Andi Kleen <ak@linux.intel.com>,
John Garry <john.garry@huawei.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
eranian@google.com
Subject: Re: [PATCH] perf metric: Fix metric_leader
Date: Sat, 15 Jan 2022 17:07:35 -0300 [thread overview]
Message-ID: <YeMph54WM/vHi7fU@kernel.org> (raw)
In-Reply-To: <20220115062852.1959424-1-irogers@google.com>
Em Fri, Jan 14, 2022 at 10:28:52PM -0800, Ian Rogers escreveu:
> Multiple events may have a metric_leader to aggregate into. This happens
> for uncore events where, for example, uncore_imc is expanded into
> uncore_imc_0, uncore_imc_1, etc. Such events all have the same metric_id
> and should aggregate into the first event. The change introducing
> metric_ids had a bug where the metric_id was compared to itself,
> creating an always true condition. Correct this by comparing the
> event in the metric_evlist and the metric_leader.
Thanks, applied.
- Arnaldo
> Fixes: ec5c5b3d2c21 ("perf metric: Encode and use metric-id as qualifier")
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
> tools/perf/util/metricgroup.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
> index 51c99cb08abf..1f1b78b0388f 100644
> --- a/tools/perf/util/metricgroup.c
> +++ b/tools/perf/util/metricgroup.c
> @@ -314,7 +314,7 @@ static int setup_metric_events(struct hashmap *ids,
> */
> metric_id = evsel__metric_id(ev);
> evlist__for_each_entry_continue(metric_evlist, ev) {
> - if (!strcmp(evsel__metric_id(metric_events[i]), metric_id))
> + if (!strcmp(evsel__metric_id(ev), metric_id))
> ev->metric_leader = metric_events[i];
> }
> }
> --
> 2.34.1.703.g22d0c6ccf7-goog
--
- Arnaldo
next prev parent reply other threads:[~2022-01-15 20:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-15 6:28 [PATCH] perf metric: Fix metric_leader Ian Rogers
2022-01-15 20:07 ` Arnaldo Carvalho de Melo [this message]
2022-01-17 18:04 ` John Garry
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=YeMph54WM/vHi7fU@kernel.org \
--to=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=eranian@google.com \
--cc=irogers@google.com \
--cc=john.garry@huawei.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.