Re: [PATCH v2 1/2] perf pmus: Add notion of default PMU for JSON events
From: Namhyung Kim
Date: Fri Jun 23 2023 - 14:04:50 EST
On Thu, Jun 22, 2023 at 9:38 PM Ian Rogers <irogers@xxxxxxxxxx> wrote:
>
> JSON events created in pmu-events.c by jevents.py may not specify a
> PMU they are associated with, in which case it is implied that it is
> the first core PMU. Care is needed to select this for regular 'cpu',
> s390 'cpum_cf' and ARMs many names as at the point the name is first
> needed the core PMUs list hasn't been initialized. Add a helper in
> perf_pmus to create this value, in the worst case by scanning sysfs.
>
> Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
> Tested-by: Thomas Richter <tmricht@xxxxxxxxxxxxx>
>
> v2. Add missing close if fdopendir fails.
Applied both to perf-tools-next after moving this v2 line, thanks!