Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753149AbbEJHMk (ORCPT ); Sun, 10 May 2015 03:12:40 -0400 Received: from terminus.zytor.com ([198.137.202.10]:45009 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753111AbbEJHMg (ORCPT ); Sun, 10 May 2015 03:12:36 -0400 Date: Sun, 10 May 2015 00:11:56 -0700 From: tip-bot for Masami Hiramatsu Message-ID: Cc: hemant@linux.vnet.ibm.com, masami.hiramatsu.pt@hitachi.com, peterz@infradead.org, hpa@zytor.com, tglx@linutronix.de, ananth@in.ibm.com, jolsa@redhat.com, namhyung@kernel.org, acme@redhat.com, dsahern@gmail.com, linux-kernel@vger.kernel.org, mingo@kernel.org Reply-To: masami.hiramatsu.pt@hitachi.com, hemant@linux.vnet.ibm.com, peterz@infradead.org, hpa@zytor.com, tglx@linutronix.de, jolsa@redhat.com, namhyung@kernel.org, ananth@in.ibm.com, linux-kernel@vger.kernel.org, mingo@kernel.org, dsahern@gmail.com, acme@redhat.com In-Reply-To: <20150508010333.24812.86568.stgit@localhost.localdomain> References: <20150508010333.24812.86568.stgit@localhost.localdomain> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf probe: Add --no-inlines option to avoid searching inline functions Git-Commit-ID: 6cfd1f6805ca0b4a341794d67eb605089435f938 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3655 Lines: 91 Commit-ID: 6cfd1f6805ca0b4a341794d67eb605089435f938 Gitweb: http://git.kernel.org/tip/6cfd1f6805ca0b4a341794d67eb605089435f938 Author: Masami Hiramatsu AuthorDate: Fri, 8 May 2015 10:03:33 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 8 May 2015 16:26:44 -0300 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/Documentation/perf-probe.txt | 4 ++++ tools/perf/builtin-probe.c | 2 ++ tools/perf/util/probe-event.h | 1 + tools/perf/util/probe-finder.c | 2 +- 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/perf/Documentation/perf-probe.txt b/tools/perf/Documentation/perf-probe.txt index ad3e355..3a8a9ba 100644 --- a/tools/perf/Documentation/perf-probe.txt +++ b/tools/perf/Documentation/perf-probe.txt @@ -83,6 +83,10 @@ OPTIONS (Only for --vars) Show external defined variables in addition to local variables. +--no-inlines:: + (Only for --add) Search only for non-inlined functions. The functions + which do not have instances are ignored. + -F:: --funcs[=FILTER]:: Show available functions in given module or kernel. With -x/--exec, diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index dbc998f..7fa2c7a 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c @@ -379,6 +379,8 @@ __cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused) OPT_CALLBACK('m', "module", NULL, "modname|path", "target module name (for online) or path (for offline)", opt_set_target), + OPT_BOOLEAN('\0', "no-inlines", &probe_conf.no_inlines, + "Don't search inlined functions"), #endif OPT__DRY_RUN(&probe_event_dry_run), OPT_INTEGER('\0', "max-probes", &probe_conf.max_probes, 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); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/