diff options
author | Leo Yan <[email protected]> | 2024-07-06 16:20:34 +0100 |
---|---|---|
committer | Namhyung Kim <[email protected]> | 2024-07-12 09:38:40 -0700 |
commit | e6b4da6759334bfdead28f9ad32323cbdbf9f670 (patch) | |
tree | a56aaa42c39946294f45063baf270720c5257e93 | |
parent | 759ce73cf74d666ca90d2860dc386fd839887e19 (diff) |
perf arm-spe: Support multiple Arm SPE PMUs
A platform can have more than one Arm SPE PMU. For example, a system
with multiple clusters may have each cluster enabled with its own Arm
SPE instance. In such case, the PMU devices will be named 'arm_spe_0',
'arm_spe_1', and so on.
Currently, the tool only supports 'arm_spe_0'. This commit extends
support to multiple Arm SPE PMUs by detecting the substring 'arm_spe_'.
Signed-off-by: Leo Yan <[email protected]>
Reviewed-by: James Clark <[email protected]>
Cc: Suzuki K Poulose <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Mike Leach <[email protected]>
Cc: Kajol Jain <[email protected]>
Cc: John Garry <[email protected]>
Cc: [email protected]
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Namhyung Kim <[email protected]>
-rw-r--r-- | tools/perf/arch/arm/util/pmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/arch/arm/util/pmu.c b/tools/perf/arch/arm/util/pmu.c index 6b544edbd3f6..1c9541d01722 100644 --- a/tools/perf/arch/arm/util/pmu.c +++ b/tools/perf/arch/arm/util/pmu.c @@ -30,7 +30,7 @@ void perf_pmu__arch_init(struct perf_pmu *pmu) pmu->selectable = true; pmu->is_uncore = false; pmu->perf_event_attr_init_default = arm_spe_pmu_default_config; - if (!strcmp(pmu->name, "arm_spe_0")) + if (strstarts(pmu->name, "arm_spe_")) pmu->mem_events = perf_mem_events_arm; } else if (strstarts(pmu->name, HISI_PTT_PMU_NAME)) { pmu->selectable = true; |