mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	Namhyung Kim <namhyung@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] perf: revert "perf probe: Fix probing kretprobes"
Date: Thu, 16 Feb 2017 08:43:05 +0900	[thread overview]
Message-ID: <20170216084305.2e03eeab6275a5f1a1443d0d@kernel.org> (raw)
In-Reply-To: <5983c261ca94850ada6a1a617c07c261023da20f.1487181941.git.naveen.n.rao@linux.vnet.ibm.com>

On Wed, 15 Feb 2017 23:47:54 +0530
"Naveen N. Rao" <naveen.n.rao@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 <mhiramat@kernel.org>

Thanks!


> 
> Signed-off-by: Naveen N. Rao <naveen.n.rao@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 <mhiramat@kernel.org>

  reply	other threads:[~2017-02-15 23:43 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14  8:31 [PATCH] kretprobes: reject registration if a symbol offset is specified Naveen N. Rao
2017-02-14  8:41 ` Ananth N Mavinakayanahalli
2017-02-14 10:32 ` Masami Hiramatsu
2017-02-15 17:53   ` Naveen N. Rao
2017-02-15 18:17     ` [PATCH 1/3] kretprobes: ensure probe location is at function entry Naveen N. Rao
2017-02-15 18:17       ` [PATCH 2/3] trace/kprobes: allow return probes with offsets and absolute addresses Naveen N. Rao
2017-02-15 23:43         ` Masami Hiramatsu
2017-02-15 18:17       ` [PATCH 3/3] perf: revert "perf probe: Fix probing kretprobes" Naveen N. Rao
2017-02-15 23:43         ` Masami Hiramatsu [this message]
2017-02-15 23:39       ` [PATCH 1/3] kretprobes: ensure probe location is at function entry Masami Hiramatsu
2017-02-16  7:51         ` Naveen N. Rao
2017-02-16  8:17       ` [PATCH 0/2] powerpc: kretprobe updates Naveen N. Rao
2017-02-16  8:17         ` [PATCH 1/2] powerpc: kretprobes: override default function entry offset Naveen N. Rao
2017-02-16  8:17         ` [PATCH 2/2] perf: powerpc: choose LEP with kretprobes Naveen N. Rao
2017-02-17 10:44         ` [PATCH 0/2] powerpc: kretprobe updates Masami Hiramatsu
2017-02-17 20:42           ` Arnaldo Carvalho de Melo
2017-02-19  4:42             ` Masami Hiramatsu
2017-02-20  9:50               ` Naveen N. Rao
2017-02-21 13:07                 ` Masami Hiramatsu
2017-02-22 13:39                   ` Naveen N. Rao
2017-02-20  9:46             ` Naveen N. Rao
2017-02-20 11:43             ` Naveen N. Rao
2017-02-21 13:06               ` Masami Hiramatsu
2017-02-15 23:28     ` [PATCH] kretprobes: reject registration if a symbol offset is specified 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=20170216084305.2e03eeab6275a5f1a1443d0d@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=acme@kernel.org \
    --cc=ananth@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    /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

Powered by JetHome