On Thu, Oct 12, 2023 at 10:56:41AM -0700, Ian Rogers wrote:
Avoid setting PMU values in arm_spe_pmu_default_config, move to perf_pmu__arch_init.
Signed-off-by: Ian Rogers irogers@google.com Reviewed-by: Adrian Hunter adrian.hunter@intel.com
tools/perf/arch/arm/util/pmu.c | 2 ++ tools/perf/arch/arm64/util/arm-spe.c | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/tools/perf/arch/arm/util/pmu.c b/tools/perf/arch/arm/util/pmu.c index d55d2b15f2e6..f25f68f84a94 100644 --- a/tools/perf/arch/arm/util/pmu.c +++ b/tools/perf/arch/arm/util/pmu.c @@ -23,6 +23,8 @@ void perf_pmu__arch_init(struct perf_pmu *pmu __maybe_unused) pmu->default_config = cs_etm_get_default_config(pmu); #if defined(__aarch64__) } else if (strstarts(pmu->name, ARM_SPE_PMU_NAME)) {
pmu->selectable = true;
pmu->is_uncore = false;
Arm SPE is not an uncore PMU event. Arm SPE driver registers sysfs node 'cpumask', thus it misleads the pmu_is_uncore() function and it returns 'true' for Arm SPE event.
Here we need to explictly set false to correct the 'is_uncore' flag.
I did test on my machine, the changes work well for Arm SPE event.
Tested-by: Leo Yan leo.yan@linaro.org