From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Chun-Tse Shao <ctshao@google.com>,
linux-kernel@vger.kernel.org, Ian Rogers <irogers@google.com>,
peterz@infradead.org, mingo@redhat.com, mark.rutland@arm.com,
alexander.shishkin@linux.intel.com, jolsa@kernel.org,
adrian.hunter@intel.com, james.clark@linaro.org,
thomas.falcon@intel.com, tmricht@linux.ibm.com,
linux-perf-users@vger.kernel.org
Subject: Re: [RESEND PATCH v2] perf tools: Ensure event leader stays at head of evlist after sorting
Date: Thu, 4 Jun 2026 11:04:17 -0300 [thread overview]
Message-ID: <aiGF4ZT3lleisLQb@x1> (raw)
In-Reply-To: <agArPG7T5rACOOcv@google.com>
On Sat, May 09, 2026 at 11:52:44PM -0700, Namhyung Kim wrote:
> Hello,
>
> On Tue, May 05, 2026 at 02:19:00PM -0700, Chun-Tse Shao wrote:
> > From: Ian Rogers <irogers@google.com>
> >
> > For evlist of a certain event/metric, the HEAD should be the event
> > leader. In some scenarios where uncore_xxx_0 does not exist, the event
> > leader is not the first element after sorting. For example, on my test
> > machine uncore_iio_0 does not exist, the event leader is uncore_iio_2.
> >
> > However, in `evlist__cmp`, it was reordered based on the PMU name, which
> > makes uncore_iio_1 the HEAD of evlist, breaking the following merge
> > logic in `evsel__merge_aliases`.
> >
> > The patch adds a loop at the end of
> > `parse_events__sort_events_and_fix_groups` to make sure the first
> > wildcard match is the earliest entry in the list, updating pointers
> > accordingly without breaking reordering detection.
> >
> > Tested on device lacks uncore_iio_0, and `perf test` looks good.
> >
> > Signed-off-by: Ian Rogers <irogers@google.com>
> > Signed-off-by: Chun-Tse Shao <ctshao@google.com>
>
> Acked-by: Namhyung Kim <namhyung@kernel.org>
Thanks, applied to perf-tools-next, for v7.2.
- Arnaldo
prev parent reply other threads:[~2026-06-04 14:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-05 21:19 [RESEND PATCH v2] perf tools: Ensure event leader stays at head of evlist after sorting Chun-Tse Shao
2026-05-10 6:52 ` Namhyung Kim
2026-06-04 14:04 ` Arnaldo Carvalho de Melo [this message]
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=aiGF4ZT3lleisLQb@x1 \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=ctshao@google.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--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 \
--cc=thomas.falcon@intel.com \
--cc=tmricht@linux.ibm.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