Re: [PATCH 1/2] perf tools: Always uniquify event names

From: Arnaldo Carvalho de Melo

Date: Tue Jan 20 2026 - 15:35:32 EST


On Thu, Dec 04, 2025 at 08:34:34AM -0800, Ian Rogers wrote:
> On Thu, Dec 4, 2025 at 1:11 AM James Clark <james.clark@xxxxxxxxxx> wrote:
> > evlist__uniquify_evsel_names() only gets called in __parse_events() if
> > verbose is > 0. This means that the auto added "slots" events stay as
> > "slots" rather than being expanded to "cpu_core/slots/" unless Perf is
> > run in verbose mode. This is invisible to users when running Perf stat
> > because evlist__print_counters() always calls it regardless of verbose
> > mode before displaying.

> > The only thing this seems to affect is the test "Parsing of all PMU
> > events from sysfs" which fails when not run in verbose mode.
> > test__checkevent_pmu_events() always expects event names to be prefixed
> > with the pmu name, but this only happens for "slots" events after
> > evlist__uniquify_evsel_names() is called.

> > One fix could be to relax the test to accept the non prefixed name in
> > normal mode. But seeing as Perf stat uniquifies unconditionally, make
> > parse_events() do the same.

> > This fixes the following test failure:

> > $ perf test "Parsing of all PMU events from sysfs"
> > 5.2: Parsing of all PMU events from sysfs : FAILED!

> > Signed-off-by: James Clark <james.clark@xxxxxxxxxx>

> Reviewed-by: Ian Rogers <irogers@xxxxxxxxxx>

Thanks, applied to perf-tools-next,

- Arnaldo