From 6cfd1f6805ca0b4a341794d67eb605089435f938 Mon Sep 17 00:00:00 2001 From: Masami Hiramatsu Date: Fri, 8 May 2015 10:03:33 +0900 Subject: perf probe: Add --no-inlines option to avoid searching inline functions Add --no-inlines(--inlines) option to avoid searching inline functions. Searching all functions which matches glob pattern can take a long time and find a lot of inline functions. With this option perf-probe searches target on the non-inlined functions. Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: David Ahern Cc: Hemant Kumar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20150508010333.24812.86568.stgit@localhost.localdomain Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/probe-event.h | 1 + tools/perf/util/probe-finder.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'tools/perf/util') diff --git a/tools/perf/util/probe-event.h b/tools/perf/util/probe-event.h index db9a9cb2..633aba7 100644 --- a/tools/perf/util/probe-event.h +++ b/tools/perf/util/probe-event.h @@ -10,6 +10,7 @@ struct probe_conf { bool show_ext_vars; bool force_add; + bool no_inlines; int max_probes; }; extern struct probe_conf probe_conf; diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index f4f5eed..1713421 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c @@ -943,7 +943,7 @@ static int probe_point_search_cb(Dwarf_Die *sp_die, void *data) /* TODO: Check the address in this function */ param->retval = call_probe_finder(sp_die, pf); } - } else + } else if (!probe_conf.no_inlines) /* Inlined function: search instances */ param->retval = die_walk_instances(sp_die, probe_point_inline_cb, (void *)pf); -- cgit v1.1