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

From: Namhyung Kim
Date: Thu May 30 2024 - 01:35:35 EST


On Wed, May 29, 2024 at 12:25 PM Ian Rogers <irogers@xxxxxxxxxx> wrote:
> We can fix the arm_dsu bug by renaming cycles there. If that's too
> hard to land, clearing up ambiguity by adding a PMU name has always
> been the way to do this. My preference for v6.10 is revert the revert,
> then add either a rename of the arm_dsu event and/or the change here.
>
> We can make perf record tolerant and ignore opening events on PMUs
> that don't support sampling, but I think it is too big a thing to do
> for v6.10.

How about adding a flag to parse_event_option_args so that we
can check if it's for sampling events. And then we might skip
uncore PMUs easily (assuming arm_dsu PMU is uncore).

It might not be a perfect solution but it could be a simple one.
Ideally I think it'd be nice if the kernel exports more information
about the PMUs like sampling and exclude capabilities.

Thanks,
Namhyung