]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
perf header: Switch "cpu" for find_core_pmu in caps feature writing
authorIan Rogers <irogers@google.com>
Fri, 14 Nov 2025 22:05:45 +0000 (14:05 -0800)
committerNamhyung Kim <namhyung@kernel.org>
Thu, 20 Nov 2025 01:49:45 +0000 (17:49 -0800)
Writing currently fails on non-x86 and hybrid CPUs. Switch to the more
regular find_core_pmu that is normally used in this case. Tested on
hybrid alderlake system.

Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/header.c

index a2f808841b33abdb070d2476ae48dfd99bdda5a0..e69b271f8073db422e83636141a1a8f3c8529a24 100644 (file)
@@ -1560,7 +1560,7 @@ static int __write_pmu_caps(struct feat_fd *ff, struct perf_pmu *pmu,
 static int write_cpu_pmu_caps(struct feat_fd *ff,
                              struct evlist *evlist __maybe_unused)
 {
-       struct perf_pmu *cpu_pmu = perf_pmus__find("cpu");
+       struct perf_pmu *cpu_pmu = perf_pmus__find_core_pmu();
        int ret;
 
        if (!cpu_pmu)