stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	stable@vger.kernel.org
Subject: Re: [PATCH 3/3] perf-probe: Do not show the skipped events
Date: Thu, 23 Apr 2020 11:01:39 -0300	[thread overview]
Message-ID: <20200423140139.GG19437@kernel.org> (raw)
In-Reply-To: <158763968263.30755.12800484151476026340.stgit@devnote2>

Em Thu, Apr 23, 2020 at 08:01:22PM +0900, Masami Hiramatsu escreveu:
> When a probe point is expanded to several places (like inlined) and
> if some of them are skipped because of blacklisted or __init function,
> those trace_events has no event name. It must be skipped while showing
> results.
> 
> Without this fix, you can see "(null):(null)" on the list,
> ===========

Ok, you broke the patch in two, I think its better to combine both, ok?

- Arnaldo

>   # ./perf probe request_resource
>   reserve_setup is out of .text, skip it.
>   Added new events:
>     (null):(null)        (on request_resource)
>     probe:request_resource (on request_resource)
> 
>   You can now use it in all perf tools, such as:
> 
>   	perf record -e probe:request_resource -aR sleep 1
> 
> ===========
> 
> With this fix, it is ignored.
> ===========
>   # ./perf probe request_resource
>   reserve_setup is out of .text, skip it.
>   Added new events:
>     probe:request_resource (on request_resource)
> 
>   You can now use it in all perf tools, such as:
> 
>   	perf record -e probe:request_resource -aR sleep 1
> 
> ===========
> 
> Fixes: 5a51fcd1f30c ("perf probe: Skip kernel symbols which is out of .text")
> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
> Cc: stable@vger.kernel.org
> ---
>  tools/perf/builtin-probe.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
> index 70548df2abb9..6b1507566770 100644
> --- a/tools/perf/builtin-probe.c
> +++ b/tools/perf/builtin-probe.c
> @@ -364,6 +364,9 @@ static int perf_add_probe_events(struct perf_probe_event *pevs, int npevs)
>  
>  		for (k = 0; k < pev->ntevs; k++) {
>  			struct probe_trace_event *tev = &pev->tevs[k];
> +			/* Skipped events have no event name */
> +			if (!tev->event)
> +				continue;
>  
>  			/* We use tev's name for showing new events */
>  			show_perf_probe_event(tev->group, tev->event, pev,
> 

-- 

- Arnaldo

  reply	other threads:[~2020-04-23 14:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23 11:00 [PATCH 0/3] perf-probe: Fix __init function and blacklist checking Masami Hiramatsu
2020-04-23 11:01 ` [PATCH 1/3] perf-probe: Fix to check blacklist address correctly Masami Hiramatsu
2020-04-26 15:03   ` Sasha Levin
2020-05-06 16:44   ` Arnaldo Carvalho de Melo
2020-04-23 11:01 ` [PATCH 2/3] perf-probe: Check address correctness by map instead of _etext Masami Hiramatsu
2020-04-23 14:01   ` Arnaldo Carvalho de Melo
2020-04-23 11:01 ` [PATCH 3/3] perf-probe: Do not show the skipped events Masami Hiramatsu
2020-04-23 14:01   ` Arnaldo Carvalho de Melo [this message]
2020-04-23 23:33     ` Masami Hiramatsu
2020-04-24 13:08       ` Arnaldo Carvalho de Melo
2020-05-06 16:48 ` [PATCH 0/3] perf-probe: Fix __init function and blacklist checking Arnaldo Carvalho de Melo

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=20200423140139.GG19437@kernel.org \
    --to=arnaldo.melo@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=stable@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).