aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ftrace_event.h
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-06-08 11:22:06 -0400
committerSteven Rostedt <rostedt@goodmis.org>2010-06-28 21:13:14 -0400
commita1d0ce8213e9ddf4046ef5ba95c55762d075f541 (patch)
treec72fb18588de555c8fa0c61452ae14ffe37dbf8a /include/linux/ftrace_event.h
parentd62f85d1e22e537192ce494c89540e1ac0d8bfc7 (diff)
tracing: Use class->reg() for all registering of events
Because kprobes and syscalls need special processing to register events, the class->reg() method was created to handle the differences. But instead of creating a default ->reg for perf and ftrace events, the code was scattered with: if (class->reg) class->reg(); else default_reg(); This is messy and can also lead to bugs. This patch cleans up this code and creates a default reg() entry for the events allowing for the code to directly call the class->reg() without the condition. Reported-by: Peter Zijlstra <peterz@infradead.org> Acked-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/ftrace_event.h')
-rw-r--r--include/linux/ftrace_event.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
index 0af31cd335d6..01df7ca4ead7 100644
--- a/include/linux/ftrace_event.h
+++ b/include/linux/ftrace_event.h
@@ -146,6 +146,9 @@ struct ftrace_event_class {
146 int (*raw_init)(struct ftrace_event_call *); 146 int (*raw_init)(struct ftrace_event_call *);
147}; 147};
148 148
149extern int ftrace_event_reg(struct ftrace_event_call *event,
150 enum trace_reg type);
151
149enum { 152enum {
150 TRACE_EVENT_FL_ENABLED_BIT, 153 TRACE_EVENT_FL_ENABLED_BIT,
151 TRACE_EVENT_FL_FILTERED_BIT, 154 TRACE_EVENT_FL_FILTERED_BIT,