Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <james.clark@linaro.org>
Reviewed-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250219151622.1097289-1-james.clark@linaro.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>

authored by

James Clark and committed by
Namhyung Kim
687b8c39 2ed0e3ea

+4 -5
+4 -5
tools/perf/builtin-list.c
··· 163 163 } else 164 164 fputc('\n', fp); 165 165 166 - if (long_desc && print_state->long_desc) { 167 - fprintf(fp, "%*s", 8, "["); 168 - wordwrap(fp, long_desc, 8, pager_get_columns(), 0); 169 - fprintf(fp, "]\n"); 170 - } else if (desc && print_state->desc) { 166 + if (long_desc && print_state->long_desc) 167 + desc = long_desc; 168 + 169 + if (desc && (print_state->desc || print_state->long_desc)) { 171 170 char *desc_with_unit = NULL; 172 171 int desc_len = -1; 173 172