All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
To: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
	David Ahern <dsahern@gmail.com>,
	linux-kernel@vger.kernel.org,
	"Steven Rostedt (Red Hat)" <rostedt@goodmis.org>,
	Oleg Nesterov <oleg@redhat.com>, Ingo Molnar <mingo@redhat.com>,
	"David A. Long" <dave.long@linaro.org>,
	yrl.pp-manager.tt@hitachi.com, Namhyung Kim <namhyung@kernel.org>
Subject: Re: [PATCH -tip 3/8] perf-probe: Show in what binaries/modules probes are set
Date: Thu, 23 Jan 2014 11:49:09 -0300	[thread overview]
Message-ID: <20140123144909.GC17572@ghostprotocols.net> (raw)
In-Reply-To: <20140123022952.7206.79515.stgit@kbuild-fedora.yrl.intra.hitachi.co.jp>

Em Thu, Jan 23, 2014 at 02:29:52AM +0000, Masami Hiramatsu escreveu:
> Show the name of binary file or modules in which the probes
> are set with --list option.
> 
> Without this change;
> 
> # ./perf probe -m drm drm_av_sync_delay
> # ./perf probe -x perf dso__load_vmlinux

Please add two spaces before lines starting with #, because 'git commit
--amend' asks you to:

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.

:-)

- Arnaldo
 
> # ./perf probe -l
>   probe:drm_av_sync_delay (on drm_av_sync_delay)
>   probe_perf:dso__load_vmlinux (on 0x000000000006d110)
> 
> With this change;
> 
> # ./perf probe -l
>   probe:drm_av_sync_delay (on drm_av_sync_delay in drm)
>   probe_perf:dso__load_vmlinux (on 0x000000000006d110 in /kbuild/ksrc/linux-3/tools/perf/perf)
> 
> Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
> ---
>  tools/perf/util/probe-event.c |   10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
> index 14c649df..2fb4486 100644
> --- a/tools/perf/util/probe-event.c
> +++ b/tools/perf/util/probe-event.c
> @@ -1742,7 +1742,8 @@ static struct strlist *get_probe_trace_command_rawlist(int fd)
>  }
>  
>  /* Show an event */
> -static int show_perf_probe_event(struct perf_probe_event *pev)
> +static int show_perf_probe_event(struct perf_probe_event *pev,
> +				 const char *module)
>  {
>  	int i, ret;
>  	char buf[128];
> @@ -1758,6 +1759,8 @@ static int show_perf_probe_event(struct perf_probe_event *pev)
>  		return ret;
>  
>  	printf("  %-20s (on %s", buf, place);
> +	if (module)
> +		printf(" in %s", module);
>  
>  	if (pev->nargs > 0) {
>  		printf(" with");
> @@ -1795,7 +1798,8 @@ static int __show_perf_probe_events(int fd, bool is_kprobe)
>  			ret = convert_to_perf_probe_event(&tev, &pev,
>  								is_kprobe);
>  			if (ret >= 0)
> -				ret = show_perf_probe_event(&pev);
> +				ret = show_perf_probe_event(&pev,
> +							    tev.point.module);
>  		}
>  		clear_perf_probe_event(&pev);
>  		clear_probe_trace_event(&tev);
> @@ -1994,7 +1998,7 @@ static int __add_probe_trace_events(struct perf_probe_event *pev,
>  		group = pev->group;
>  		pev->event = tev->event;
>  		pev->group = tev->group;
> -		show_perf_probe_event(pev);
> +		show_perf_probe_event(pev, tev->point.module);
>  		/* Trick here - restore current event/group */
>  		pev->event = (char *)event;
>  		pev->group = (char *)group;
> 

  reply	other threads:[~2014-01-23 14:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-23  2:29 [PATCH -tip 0/8] perf-probe: Updates for handling local functions correctly Masami Hiramatsu
2014-01-23  2:29 ` [PATCH -tip 1/8] [BUGFIX] perf-probe: Fix to do exit call for symbol maps Masami Hiramatsu
2014-01-23  2:29 ` [PATCH -tip 2/8] [BUGFIX] perf-tools: Load map before using map->map_ip Masami Hiramatsu
2014-01-23 14:43   ` Arnaldo Carvalho de Melo
2014-01-25 14:23   ` [tip:perf/urgent] perf symbols: Load map before using map->map_ip () tip-bot for Masami Hiramatsu
2014-01-23  2:29 ` [PATCH -tip 3/8] perf-probe: Show in what binaries/modules probes are set Masami Hiramatsu
2014-01-23 14:49   ` Arnaldo Carvalho de Melo [this message]
2014-01-23  2:29 ` [PATCH -tip 4/8] perf-probe: Use the actual address instead of the symbol name Masami Hiramatsu
2014-01-23 14:52   ` Arnaldo Carvalho de Melo
2014-01-23 16:12     ` Steven Rostedt
2014-01-24  1:49       ` Masami Hiramatsu
2014-01-24 12:13         ` Arnaldo Carvalho de Melo
2014-01-25  3:04           ` Masami Hiramatsu
2014-01-23  2:29 ` [PATCH -tip 5/8] perf-probe: Show source level information for address only kprobes Masami Hiramatsu
2014-01-23  2:29 ` [PATCH -tip 6/8] perf-probe: Show symbol+offset " Masami Hiramatsu
2014-01-23  2:30 ` [PATCH -tip 7/8] perf-probe: Show source-level or symbol-level info for uprobes Masami Hiramatsu
2014-01-23  2:30 ` [PATCH -tip 8/8] perf-probe: Allow to add events on the local functions Masami Hiramatsu
2014-01-27 10:26 ` [PATCH -tip 0/8] perf-probe: Updates for handling local functions correctly Masami Hiramatsu
2014-01-27 14:46   ` 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=20140123144909.GC17572@ghostprotocols.net \
    --to=acme@ghostprotocols.net \
    --cc=dave.long@linaro.org \
    --cc=dsahern@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=oleg@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=srikar@linux.vnet.ibm.com \
    --cc=yrl.pp-manager.tt@hitachi.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 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.