On Wed, 15 Feb 2017 23:47:54 +0530 "Naveen N. Rao" <naveen.n....@linux.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 <mhira...@kernel.org> Thanks! > > Signed-off-by: Naveen N. Rao <naveen.n....@linux.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 <mhira...@kernel.org>