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

perf list: Support matching by topic

Add support in perf list topic to only show events belonging to a
specific vendor events topic. For example the following works now:

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

stalled-cycles-frontend OR idle-cycles-frontend [Hardware event]

stalled-cycles-frontend OR cpu/stalled-cycles-frontend/ [Kernel PMU event]

frontend:
dsb2mite_switches.count
[Decode Stream Buffer (DSB)-to-MITE switches]
dsb2mite_switches.penalty_cycles
[Decode Stream Buffer (DSB)-to-MITE switch true penalty cycles]
dsb_fill.exceed_dsb_lines
[Cycles when Decode Stream Buffer (DSB) fill encounter more than 3 Decode Stream Buffer (DSB)
lines]
icache.hit
[Number of Instruction Cache, Streaming Buffer and Victim Cache Reads. both cacheable and
noncacheable, including UC fetches]
...

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/r/1476902724-9586-2-git-send-email-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Andi Kleen and committed by
Arnaldo Carvalho de Melo
67bdc35f 99620a5d

+3 -1
+3 -1
tools/perf/util/pmu.c
··· 1141 1141 if (event_glob != NULL && 1142 1142 !(strglobmatch_nocase(name, event_glob) || 1143 1143 (!is_cpu && strglobmatch_nocase(alias->name, 1144 - event_glob)))) 1144 + event_glob)) || 1145 + (alias->topic && 1146 + strglobmatch_nocase(alias->topic, event_glob)))) 1145 1147 continue; 1146 1148 1147 1149 if (is_cpu && !name_only && !alias->desc)