summaryrefslogtreecommitdiff
path: root/tools/perf/util/probe-event.h
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2015-09-04 12:16:01 (GMT)
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-09-04 15:37:17 (GMT)
commitb02137cc6550c1fa28e9a7c943a79fe6e4c4378d (patch)
treefeadc35a53af38d04948b8dbfa9a00b253233e7b /tools/perf/util/probe-event.h
parent12fae5ef6dc6031ffcf4dffc6be5a16080e7dd7d (diff)
downloadlinux-b02137cc6550c1fa28e9a7c943a79fe6e4c4378d.tar.xz
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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/probe-event.h b/tools/perf/util/probe-event.h
index 70c327b..610f743 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);