From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: ananth@in.ibm.com, Peter Zijlstra <peterz@infradead.org>,
hemant@linux.vnet.ibm.com,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
David Ahern <dsahern@gmail.com>,
namhyung@kernel.org, Jiri Olsa <jolsa@redhat.com>,
Ingo Molnar <mingo@kernel.org>
Subject: [PATCH perf/core v2 3/4] perf-probe: Add --no-inlines option to avoid searching inline functions
Date: Fri, 08 May 2015 10:03:33 +0900 [thread overview]
Message-ID: <20150508010333.24812.86568.stgit@localhost.localdomain> (raw)
In-Reply-To: <20150508010326.24812.56013.stgit@localhost.localdomain>
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 <masami.hiramatsu.pt@hitachi.com>
---
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);
next prev parent reply other threads:[~2015-05-08 1:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-08 1:03 [PATCH perf/core v2 0/4] perf-probe code cleanup and support wildcard for probe points Masami Hiramatsu
2015-05-08 1:03 ` [PATCH perf/core v2 1/4] perf probe: Use perf_probe_event.target instead of passing as an argument Masami Hiramatsu
2015-05-10 7:11 ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2015-05-08 1:03 ` [PATCH perf/core v2 2/4] perf probe: Introduce probe_conf global configs Masami Hiramatsu
2015-05-10 7:11 ` [tip:perf/core] " tip-bot for Masami Hiramatsu
2015-05-08 1:03 ` Masami Hiramatsu [this message]
2015-05-10 7:11 ` [tip:perf/core] perf probe: Add --no-inlines option to avoid searching inline functions tip-bot for Masami Hiramatsu
2015-05-08 1:03 ` [PATCH perf/core v2 4/4] perf-probe: Support glob wildcards for function name Masami Hiramatsu
2015-05-10 7:12 ` [tip:perf/core] perf probe: " tip-bot for Masami Hiramatsu
2015-05-08 19:38 ` [PATCH perf/core v2 0/4] perf-probe code cleanup and support wildcard for probe points Arnaldo Carvalho de Melo
2015-05-10 3:02 ` Masami Hiramatsu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150508010333.24812.86568.stgit@localhost.localdomain \
--to=masami.hiramatsu.pt@hitachi.com \
--cc=acme@kernel.org \
--cc=ananth@in.ibm.com \
--cc=dsahern@gmail.com \
--cc=hemant@linux.vnet.ibm.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox