Skip to content

Commit f41ebe9

Browse files
mhiramatacmel
authored andcommitted
perf probe: Do not show the skipped events
When a probe point is expanded to several places (like inlined) and if some of them are skipped because of blacklisted or __init function, those trace_events has no event name. It must be skipped while showing results. Without this fix, you can see "(null):(null)" on the list, # ./perf probe request_resource reserve_setup is out of .text, skip it. Added new events: (null):(null) (on request_resource) probe:request_resource (on request_resource) You can now use it in all perf tools, such as: perf record -e probe:request_resource -aR sleep 1 # With this fix, it is ignored: # ./perf probe request_resource reserve_setup is out of .text, skip it. Added new events: probe:request_resource (on request_resource) You can now use it in all perf tools, such as: perf record -e probe:request_resource -aR sleep 1 # Fixes: 5a51fcd ("perf probe: Skip kernel symbols which is out of .text") Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: stable@vger.kernel.org Link: http://lore.kernel.org/lkml/158763968263.30755.12800484151476026340.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 2ae5d0d commit f41ebe9

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎tools/perf/builtin-probe.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,9 @@ static int perf_add_probe_events(struct perf_probe_event *pevs, int npevs)
364364

365365
for (k = 0; k < pev->ntevs; k++) {
366366
struct probe_trace_event *tev = &pev->tevs[k];
367+
/* Skipped events have no event name */
368+
if (!tev->event)
369+
continue;
367370

368371
/* We use tev's name for showing new events */
369372
show_perf_probe_event(tev->group, tev->event, pev,

0 commit comments

Comments
 (0)