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

John Garry john.g.garry at oracle.com
Wed Sep 13 23:40:41 PDT 2023


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 at google.com>
> Reviewed-by: Ian Rogers <irogers at google.com>
> Signed-off-by: James Clark <james.clark at arm.com>

Reviewed-by: John Garry <john.g.garry at oracle.com>




More information about the linux-arm-kernel mailing list