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

perf list: Filter metrics too

When a filter is specified on the command line, filter the metrics too.

Before:

% perf list foo
List of pre-defined events (to be used in -e):

Metric Groups:

DSB:
DSB_Coverage
[Fraction of Uops delivered by the DSB (aka Decoded Icache; or Uop Cache)]
... more metrics ...

After:

% perf list foo

List of pre-defined events (to be used in -e):

Metric Groups:

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
LPU-Reference: 20190314225002.30108-1-andi@firstfloor.org
Link: https://lkml.kernel.org/n/tip-1y8oi2s8c4jhjtykgs5zvda1@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Andi Kleen and committed by
Arnaldo Carvalho de Melo
6f40b2a5 dfcbc2f2

+1 -1
+1 -1
tools/perf/builtin-list.c
··· 119 119 details_flag); 120 120 print_tracepoint_events(NULL, s, raw_dump); 121 121 print_sdt_events(NULL, s, raw_dump); 122 - metricgroup__print(true, true, NULL, raw_dump, details_flag); 122 + metricgroup__print(true, true, s, raw_dump, details_flag); 123 123 free(s); 124 124 } 125 125 }