[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170216084305.2e03eeab6275a5f1a1443d0d@kernel.org>
Date: Thu, 16 Feb 2017 08:43:05 +0900
From: Masami Hiramatsu <mhiramat@...nel.org>
To: "Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth@...ux.vnet.ibm.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Ingo Molnar <mingo@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] perf: revert "perf probe: Fix probing kretprobes"
On Wed, 15 Feb 2017 23:47:54 +0530
"Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com> wrote:
> This reverts commit 25dd9171f51c ("perf probe: Fix probing kretprobes").
> kprobe_events now accepts offsets for kretprobes.
>
> perf needs to be able to place return probes on static functions that
> have the same name. Using the function name doesn't allow us to do that.
> Instead, we should use the same scheme we use for kprobes: offset'ing
> from _text/_stext.
So now we can use retprobe on static functions safely :)
Acked-by: Masami Hiramatsu <mhiramat@...nel.org>
Thanks!
>
> Signed-off-by: Naveen N. Rao <naveen.n.rao@...ux.vnet.ibm.com>
> ---
> tools/perf/util/probe-event.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
> index 6a6f44dd594b..fa7f81af11e8 100644
> --- a/tools/perf/util/probe-event.c
> +++ b/tools/perf/util/probe-event.c
> @@ -757,7 +757,7 @@ post_process_kernel_probe_trace_events(struct probe_trace_event *tevs,
> }
>
> for (i = 0; i < ntevs; i++) {
> - if (!tevs[i].point.address || tevs[i].point.retprobe)
> + if (!tevs[i].point.address)
> continue;
> /* If we found a wrong one, mark it by NULL symbol */
> if (kprobe_warn_out_range(tevs[i].point.symbol,
> @@ -2841,7 +2841,7 @@ static int find_probe_trace_events_from_map(struct perf_probe_event *pev,
> }
>
> /* Note that the symbols in the kmodule are not relocated */
> - if (!pev->uprobes && !pp->retprobe && !pev->target) {
> + if (!pev->uprobes && !pev->target) {
> reloc_sym = kernel_get_ref_reloc_sym();
> if (!reloc_sym) {
> pr_warning("Relocated base symbol is not found!\n");
> --
> 2.11.0
>
--
Masami Hiramatsu <mhiramat@...nel.org>
Powered by blists - more mailing lists