Skip to content

Commit e6b4da6

Browse files
Leo-Yannamhyung
authored andcommitted
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]>
1 parent 759ce73 commit e6b4da6

File tree

1 file changed

+1
-1
lines changed
  • tools/perf/arch/arm/util

1 file changed

+1
-1
lines changed

tools/perf/arch/arm/util/pmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ void perf_pmu__arch_init(struct perf_pmu *pmu)
3030
pmu->selectable = true;
3131
pmu->is_uncore = false;
3232
pmu->perf_event_attr_init_default = arm_spe_pmu_default_config;
33-
if (!strcmp(pmu->name, "arm_spe_0"))
33+
if (strstarts(pmu->name, "arm_spe_"))
3434
pmu->mem_events = perf_mem_events_arm;
3535
} else if (strstarts(pmu->name, HISI_PTT_PMU_NAME)) {
3636
pmu->selectable = true;

0 commit comments

Comments
 (0)