From: Masami Hiramatsu <mhiramat@kernel.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Namhyung Kim <namhyung@kernel.org>
Subject: Re: [PATCH perf/core 4/4] perf-probe: Find probe events without target module
Date: Wed, 11 Jan 2017 00:54:59 +0900 [thread overview]
Message-ID: <20170111005459.9e003bbe56ecc7213cc97e49@kernel.org> (raw)
In-Reply-To: <148376691267.25966.1573791131700323631.stgit@devbox>
On Sat, 7 Jan 2017 14:28:42 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:
> Find probe events without -m "module" option. If perf-probe
> failed to find given function in kernel image, it tries to
> find same symbol and module in kallsyms, and retry search
> in the found module. E.g.
>
> # perf probe -D i915_capabilities
> p:probe/i915_capabilities i915:i915_capabilities+0
>
> Note: without -m option, perf probe can not find inlined
> function since there is no symbol information in kallsyms.
>
> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
> Suggested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> ---
> tools/perf/util/probe-event.c | 74 ++++++++++++++++++++++++++++++-----------
> 1 file changed, 55 insertions(+), 19 deletions(-)
>
> diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
> index 6a6f44d..09bd093 100644
> --- a/tools/perf/util/probe-event.c
> +++ b/tools/perf/util/probe-event.c
> @@ -858,11 +858,7 @@ static int try_to_find_probe_trace_events(struct perf_probe_event *pev,
>
> debuginfo__delete(dinfo);
>
> - if (ntevs == 0) { /* No error but failed to find probe point. */
> - pr_warning("Probe point '%s' not found.\n",
> - synthesize_perf_probe_point(&pev->point));
> - return -ENOENT;
> - } else if (ntevs < 0) {
> + if (ntevs < 0) {
> /* Error path : ntevs < 0 */
> pr_debug("An error occurred in debuginfo analysis (%d).\n", ntevs);
> if (ntevs == -EBADF)
> @@ -2073,8 +2069,10 @@ static int find_perf_probe_point_from_map(struct probe_trace_point *tp,
> } else {
> if (tp->symbol && !addr) {
> if (kernel_get_symbol_address_by_name(tp->symbol,
> - &addr, true, false) < 0)
> + &addr, true, false) < 0) {
> + ret = 0;
> goto out;
Oops, I've found that this is not needed and breaks --list result.
I'll update it.
Thanks.
--
Masami Hiramatsu <mhiramat@kernel.org>
prev parent reply other threads:[~2017-01-10 15:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-07 5:23 [PATCH perf/core 0/4] perf-probe: Fix and improve module probe events Masami Hiramatsu
2017-01-07 5:25 ` [PATCH perf/core 1/4] perf-probe: Fix to show correct locations for events on modules Masami Hiramatsu
2017-01-10 13:18 ` Arnaldo Carvalho de Melo
2017-01-10 14:15 ` Masami Hiramatsu
2017-01-10 23:51 ` Masami Hiramatsu
2017-01-07 5:26 ` [PATCH perf/core 2/4] perf-probe: Add error checks to offline probe post-processing Masami Hiramatsu
2017-01-07 5:27 ` [PATCH perf/core 3/4] perf-probe: Fix to probe on gcc generated functions in modules Masami Hiramatsu
2017-01-07 5:28 ` [PATCH perf/core 4/4] perf-probe: Find probe events without target module Masami Hiramatsu
2017-01-10 15:54 ` Masami Hiramatsu [this message]
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=20170111005459.9e003bbe56ecc7213cc97e49@kernel.org \
--to=mhiramat@kernel.org \
--cc=acme@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.