diff options
author | Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> | 2014-02-06 00:32:13 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-02-18 07:34:50 -0500 |
commit | fb226ccd2a6f77be13009edc196da2077800066b (patch) | |
tree | 8383b9a9de77fe04a8a1d039f2a4b8af6cfeb5ac /tools/perf/util/probe-event.c | |
parent | 2df58634cd2ad33d7c7ca2e02e1a44db6c8cf68d (diff) |
perf probe: Show in what binaries/modules probes are set
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
# ./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>
Cc: David Ahern <dsahern@gmail.com>
Cc: "David A. Long" <dave.long@linaro.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: yrl.pp-manager.tt@hitachi.com
Link: http://lkml.kernel.org/r/20140206053213.29635.69948.stgit@kbuild-fedora.yrl.intra.hitachi.co.jp
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/probe-event.c')
-rw-r--r-- | tools/perf/util/probe-event.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index ace3ba37c880..de9fe906f3be 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c | |||
@@ -1728,7 +1728,8 @@ static struct strlist *get_probe_trace_command_rawlist(int fd) | |||
1728 | } | 1728 | } |
1729 | 1729 | ||
1730 | /* Show an event */ | 1730 | /* Show an event */ |
1731 | static int show_perf_probe_event(struct perf_probe_event *pev) | 1731 | static int show_perf_probe_event(struct perf_probe_event *pev, |
1732 | const char *module) | ||
1732 | { | 1733 | { |
1733 | int i, ret; | 1734 | int i, ret; |
1734 | char buf[128]; | 1735 | char buf[128]; |
@@ -1744,6 +1745,8 @@ static int show_perf_probe_event(struct perf_probe_event *pev) | |||
1744 | return ret; | 1745 | return ret; |
1745 | 1746 | ||
1746 | printf(" %-20s (on %s", buf, place); | 1747 | printf(" %-20s (on %s", buf, place); |
1748 | if (module) | ||
1749 | printf(" in %s", module); | ||
1747 | 1750 | ||
1748 | if (pev->nargs > 0) { | 1751 | if (pev->nargs > 0) { |
1749 | printf(" with"); | 1752 | printf(" with"); |
@@ -1781,7 +1784,8 @@ static int __show_perf_probe_events(int fd, bool is_kprobe) | |||
1781 | ret = convert_to_perf_probe_event(&tev, &pev, | 1784 | ret = convert_to_perf_probe_event(&tev, &pev, |
1782 | is_kprobe); | 1785 | is_kprobe); |
1783 | if (ret >= 0) | 1786 | if (ret >= 0) |
1784 | ret = show_perf_probe_event(&pev); | 1787 | ret = show_perf_probe_event(&pev, |
1788 | tev.point.module); | ||
1785 | } | 1789 | } |
1786 | clear_perf_probe_event(&pev); | 1790 | clear_perf_probe_event(&pev); |
1787 | clear_probe_trace_event(&tev); | 1791 | clear_probe_trace_event(&tev); |
@@ -1980,7 +1984,7 @@ static int __add_probe_trace_events(struct perf_probe_event *pev, | |||
1980 | group = pev->group; | 1984 | group = pev->group; |
1981 | pev->event = tev->event; | 1985 | pev->event = tev->event; |
1982 | pev->group = tev->group; | 1986 | pev->group = tev->group; |
1983 | show_perf_probe_event(pev); | 1987 | show_perf_probe_event(pev, tev->point.module); |
1984 | /* Trick here - restore current event/group */ | 1988 | /* Trick here - restore current event/group */ |
1985 | pev->event = (char *)event; | 1989 | pev->event = (char *)event; |
1986 | pev->group = (char *)group; | 1990 | pev->group = (char *)group; |