aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-list.c
diff options
context:
space:
mode:
authorJames Clark <[email protected]>2025-02-19 15:16:21 +0000
committerNamhyung Kim <[email protected]>2025-02-19 21:23:43 +0000
commit687b8c3938af61230bc954f5ecf349d3a449b12a (patch)
treef42c0af073030acfdec938f892ece8f165dd0c8b /tools/perf/builtin-list.c
parentperf vendor events arm64: Fix incorrect CPU_CYCLE in metrics expr (diff)
downloadkernel-687b8c3938af61230bc954f5ecf349d3a449b12a.tar.gz
kernel-687b8c3938af61230bc954f5ecf349d3a449b12a.zip
perf list: Also append PMU name in verbose mode
When listing in verbose mode, the long description is used but the PMU name isn't appended. There doesn't seem to be a reason to exclude it when asking for more information, so use the same print block for both long and short descriptions. Before: $ perf list -v ... inst_retired [Instruction architecturally executed] After: $ perf list -v ... inst_retired [Instruction architecturally executed. Unit: armv8_cortex_a57] Signed-off-by: James Clark <[email protected]> Reviewed-by: Ian Rogers <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
Diffstat (limited to 'tools/perf/builtin-list.c')
-rw-r--r--tools/perf/builtin-list.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c
index 9e7fdfcdd7ff..c19826f218a0 100644
--- a/tools/perf/builtin-list.c
+++ b/tools/perf/builtin-list.c
@@ -163,11 +163,10 @@ static void default_print_event(void *ps, const char *topic, const char *pmu_nam
} else
fputc('\n', fp);
- if (long_desc && print_state->long_desc) {
- fprintf(fp, "%*s", 8, "[");
- wordwrap(fp, long_desc, 8, pager_get_columns(), 0);
- fprintf(fp, "]\n");
- } else if (desc && print_state->desc) {
+ if (long_desc && print_state->long_desc)
+ desc = long_desc;
+
+ if (desc && (print_state->desc || print_state->long_desc)) {
char *desc_with_unit = NULL;
int desc_len = -1;