diff options
author | Namhyung Kim <namhyung@kernel.org> | 2015-09-04 14:16:01 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-09-04 17:37:17 +0200 |
commit | b02137cc6550c1fa28e9a7c943a79fe6e4c4378d (patch) | |
tree | feadc35a53af38d04948b8dbfa9a00b253233e7b /tools/perf/util/probe-event.h | |
parent | perf probe: Link trace_probe_event into perf_probe_event (diff) | |
download | linux-b02137cc6550c1fa28e9a7c943a79fe6e4c4378d.tar.xz linux-b02137cc6550c1fa28e9a7c943a79fe6e4c4378d.zip |
perf probe: Move print logic into cmd_probe()
Showing actual trace event when adding perf events is only needed in
perf probe command. But the add functionality itself can be used by
other places. So move the printing code into the cmd_probe().
Also it combines the output if more than one event is added.
Before:
$ sudo perf probe -a do_fork -a do_exit
Added new event:
probe:do_fork (on do_fork)
You can now use it in all perf tools, such as:
perf record -e probe:do_fork -aR sleep 1
Added new events:
probe:do_exit (on do_exit)
probe:do_exit_1 (on do_exit)
You can now use it in all perf tools, such as:
perf record -e probe:do_exit_1 -aR sleep 1
After:
$ sudo perf probe -a do_fork -a do_exit
Added new events:
probe:do_fork (on do_fork)
probe:do_exit (on do_exit)
probe:do_exit_1 (on do_exit)
You can now use it in all perf tools, such as:
perf record -e probe:do_exit_1 -aR sleep 1
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1441368963-11565-3-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/probe-event.h')
-rw-r--r-- | tools/perf/util/probe-event.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/probe-event.h b/tools/perf/util/probe-event.h index 70c327bd61de..610f743671e1 100644 --- a/tools/perf/util/probe-event.h +++ b/tools/perf/util/probe-event.h @@ -144,6 +144,9 @@ extern int convert_perf_probe_events(struct perf_probe_event *pevs, int npevs); extern int apply_perf_probe_events(struct perf_probe_event *pevs, int npevs); extern void cleanup_perf_probe_events(struct perf_probe_event *pevs, int npevs); extern int del_perf_probe_events(struct strfilter *filter); +extern int show_perf_probe_event(const char *group, const char *event, + struct perf_probe_event *pev, + const char *module, bool use_stdout); extern int show_perf_probe_events(struct strfilter *filter); extern int show_line_range(struct line_range *lr, const char *module, bool user); |