summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/probe-event.h
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@redhat.com>2009-12-15 10:32:25 -0500
committerIngo Molnar <mingo@elte.hu>2009-12-15 20:22:04 +0100
commitd761b08bff0a9b653f6bd248cea50322e7eccb14 (patch)
treeec57220663387ceb65a6e34c78f80c2998ee64e6 /tools/perf/util/probe-event.h
parentaf663d75a64d2cc3f18bdb8a29ff4650b9417c16 (diff)
perf probe: Reject second attempt of adding same-name event
Reject second attempt of adding same-name event. This patch also provides --force option which allows user to add additional probe events on the same-name event. e.g. (the first attempt : success) ./perf probe schedule Added new event: probe:schedule (on schedule+0) (the second attempt : failure) ./perf probe schedule:11 Error: event "schedule" already exists. (Use -f to force duplicates.) Fatal: Can't add new event. (the second attempt with -f : successfully added) ./perf probe -f schedule:11 Added new event: probe:schedule_1 (on schedule+45) Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Jim Keniston <jkenisto@us.ibm.com> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Frank Ch. Eigler <fche@redhat.com> Cc: Jason Baron <jbaron@redhat.com> Cc: K.Prasad <prasad@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Cc: systemtap <systemtap@sources.redhat.com> Cc: DLE <dle-develop@lists.sourceforge.net> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <20091215153225.17436.15166.stgit@dhcp-100-2-132.bos.redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/probe-event.h')
-rw-r--r--tools/perf/util/probe-event.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/probe-event.h b/tools/perf/util/probe-event.h
index 8bb22f5246c..8fd30525100 100644
--- a/tools/perf/util/probe-event.h
+++ b/tools/perf/util/probe-event.h
@@ -10,7 +10,8 @@ extern void parse_perf_probe_event(const char *str, struct probe_point *pp,
extern int synthesize_perf_probe_event(struct probe_point *pp);
extern void parse_trace_kprobe_event(const char *str, struct probe_point *pp);
extern int synthesize_trace_kprobe_event(struct probe_point *pp);
-extern void add_trace_kprobe_events(struct probe_point *probes, int nr_probes);
+extern void add_trace_kprobe_events(struct probe_point *probes, int nr_probes,
+ bool force_add);
extern void del_trace_kprobe_events(struct strlist *dellist);
extern void show_perf_probe_events(void);