Re: [PATCH v3 2/3] perf pmus: Simplify perf_pmus__find_core_pmu()

From: John Garry
Date: Thu Sep 14 2023 - 02:41:24 EST


On 13/09/2023 16:33, James Clark wrote:
Currently the while loop always either exits on the first iteration with
a core PMU, or exits with NULL on heterogeneous systems or when not all
CPUs are online.

Both of the latter behaviors are undesirable for platforms other than
Arm so simplify it to always return the first core PMU, or NULL if none
exist.

This behavior was depended on by the Arm version of
pmu_metrics_table__find(), so the logic has been moved there instead.

Suggested-by: Ian Rogers <irogers@xxxxxxxxxx>
Reviewed-by: Ian Rogers <irogers@xxxxxxxxxx>
Signed-off-by: James Clark <james.clark@xxxxxxx>

Reviewed-by: John Garry <john.g.garry@xxxxxxxxxx>