diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-03-19 15:26:14 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-20 05:17:06 -0400 |
commit | 28bea271e58e429eccfad3d7ee2ad12d6ee015bf (patch) | |
tree | 00b5cf70bf147e7fad3b438835d21b093a2b9c28 /kernel/trace/trace_output.c | |
parent | 23725aeeab10ba02bcf10ec49ad73146b54cb52f (diff) |
ftrace: ensure every event gets an id
Impact: widen user-space visibe event IDs to all events
Previously only TRACE_EVENT events got ids, because only they
generated raw output which needs to be demuxed from the trace.
In order to provide a unique ID for each event, register everybody,
regardless.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <20090319194233.464914218@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace_output.c')
-rw-r--r-- | kernel/trace/trace_output.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index b45141748af5..19261fdd2455 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c | |||
@@ -481,6 +481,11 @@ int register_ftrace_event(struct trace_event *event) | |||
481 | 481 | ||
482 | mutex_lock(&trace_event_mutex); | 482 | mutex_lock(&trace_event_mutex); |
483 | 483 | ||
484 | if (!event) { | ||
485 | ret = next_event_type++; | ||
486 | goto out; | ||
487 | } | ||
488 | |||
484 | if (!event->type) | 489 | if (!event->type) |
485 | event->type = next_event_type++; | 490 | event->type = next_event_type++; |
486 | else if (event->type > __TRACE_LAST_TYPE) { | 491 | else if (event->type > __TRACE_LAST_TYPE) { |