Re: [PATCH v1] perf evlist: Force adding default events only to core PMUs

From: Linus Torvalds
Date: Sat May 25 2024 - 12:44:23 EST


On Sat, 25 May 2024 at 08:30, Ian Rogers <irogers@xxxxxxxxxx> wrote:
>
> PMUs other than core PMUs may have a 'cycles' event. Default opening a
> non-core cycles event with perf record can lead to perf_event_open
> failure. Avoid this by only opening the default 'cycles' event on core
> PMUs.
>
> Closes: https://lore.kernel.org/lkml/CAHk-=wiWvtFyedDNpoV7a8Fq_FpbB+F5KmWK2xPY3QoYseOf_A@xxxxxxxxxxxxxx/
> Fixes: 617824a7f0f7 ("perf parse-events: Prefer sysfs/JSON hardware events over legacy")
> Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>

This makes 'perf record' work for me again.

Tested-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

Thanks,

Linus