diff options
| author | Ian Rogers <irogers@google.com> | 2026-06-02 08:25:08 -0700 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-06-03 16:49:56 -0300 |
| commit | 5d57371b9cd2a40e04df0104b62a4c302555d076 (patch) | |
| tree | 136a682ab54a7e5bd6ac425a06ac3bbfea1e9af7 | |
| parent | 82ed70f00ccce18bd68cc82b62a80bb5a7f44856 (diff) | |
| download | linux-5d57371b9cd2a40e04df0104b62a4c302555d076.tar.gz linux-5d57371b9cd2a40e04df0104b62a4c302555d076.zip | |
perf header: In print_pmu_caps use perf_env e_machine
Switch from arch to e_machine in print_pmu_caps.
Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Honglei Wang <jameshongleiwang@126.com>
Cc: Jan Polensky <japo@linux.ibm.com>
Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
| -rw-r--r-- | tools/perf/util/header.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 220e7720fbdb..ecdac427d9c4 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -2461,15 +2461,16 @@ static void print_cpu_pmu_caps(struct feat_fd *ff, FILE *fp) static void print_pmu_caps(struct feat_fd *ff, FILE *fp) { struct perf_env *env = &ff->ph->env; - struct pmu_caps *pmu_caps; + uint16_t e_machine = perf_env__e_machine(env, /*e_flags=*/NULL); for (int i = 0; i < env->nr_pmus_with_caps; i++) { - pmu_caps = &env->pmu_caps[i]; + struct pmu_caps *pmu_caps = &env->pmu_caps[i]; + __print_pmu_caps(fp, pmu_caps->nr_caps, pmu_caps->caps, pmu_caps->pmu_name); } - if (strcmp(perf_env__arch(env), "x86") == 0 && + if ((e_machine == EM_X86_64 || e_machine == EM_386) && perf_env__has_pmu_mapping(env, "ibs_op")) { char *max_precise = perf_env__find_pmu_cap(env, "cpu", "max_precise"); |
