mirror of
https://github.com/torvalds/linux.git
synced 2026-12-02 03:22:37 +00:00
Hide that the pmu_event structs are an array with a new wrapper struct. Signed-off-by: Ian Rogers <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: James Clark <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: John Garry <[email protected]> Cc: Kan Liang <[email protected]> Cc: Leo Yan <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Mike Leach <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Ravi Bangoria <[email protected]> Cc: Stephane Eranian <[email protected]> Cc: Will Deacon <[email protected]> Cc: Xing Zhengjun <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
26 lines
529 B
C
26 lines
529 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
#include "../../../util/cpumap.h"
|
|
#include "../../../util/pmu.h"
|
|
|
|
const struct pmu_events_table *pmu_events_table__find(void)
|
|
{
|
|
struct perf_pmu *pmu = NULL;
|
|
|
|
while ((pmu = perf_pmu__scan(pmu))) {
|
|
if (!is_pmu_core(pmu->name))
|
|
continue;
|
|
|
|
/*
|
|
* The cpumap should cover all CPUs. Otherwise, some CPUs may
|
|
* not support some events or have different event IDs.
|
|
*/
|
|
if (pmu->cpus->nr != cpu__max_cpu().cpu)
|
|
return NULL;
|
|
|
|
return perf_pmu__find_table(pmu);
|
|
}
|
|
|
|
return NULL;
|
|
}
|