[PATCH v1 1/3] perf list: Don't print Unit for default_core
From: Ian Rogers
Date: Thu Aug 31 2023 - 03:14:50 EST
default_core was added as a way to demark json events whose PMU should
be whatever the default core PMU is, previously this had been assumed
to be "cpu" but that fails on s390 and ARM. perf list displays the PMU
in the event description to save storing it in json, but was still
comparing against "cpu" and not "default_core", so update this.
Fixes: d2045f87154b ("perf jevents: Use "default_core" for events with no Unit")
Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
---
tools/perf/builtin-list.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c
index 1ac47db4d66a..a343823c8ddf 100644
--- a/tools/perf/builtin-list.c
+++ b/tools/perf/builtin-list.c
@@ -148,7 +148,7 @@ static void default_print_event(void *ps, const char *pmu_name, const char *topi
char *desc_with_unit = NULL;
int desc_len = -1;
- if (pmu_name && strcmp(pmu_name, "cpu")) {
+ if (pmu_name && strcmp(pmu_name, "default_core")) {
desc_len = strlen(desc);
desc_len = asprintf(&desc_with_unit,
desc[desc_len - 1] != '.'
--
2.42.0.rc2.253.gd59a3bf2b4-goog