diff options
author | Ian Rogers <[email protected]> | 2023-08-31 00:14:19 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2023-08-31 16:24:47 -0300 |
commit | 478c3f5dcd8ca7eb1ef0c7a7022cca80b528325c (patch) | |
tree | f3967b85d67c640cf093e15c1aa5a3406632c35b | |
parent | bdc60129915fb4ff7832f4833512779c6a94eb5f (diff) |
perf list: Don't print Unit for "default_core"
"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: d2045f87154bf67a ("perf jevents: Use "default_core" for events with no Unit")
Signed-off-by: Ian Rogers <[email protected]>
Tested-by: Kan Liang <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: James Clark <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Rob Herring <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r-- | tools/perf/builtin-list.c | 2 |
1 files changed, 1 insertions, 1 deletions
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] != '.' |