mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 21:51:05 +00:00
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>
This commit is contained in:
parent
23725aeeab
commit
28bea271e5
2 changed files with 19 additions and 1 deletions
|
@ -481,6 +481,11 @@ int register_ftrace_event(struct trace_event *event)
|
|||
|
||||
mutex_lock(&trace_event_mutex);
|
||||
|
||||
if (!event) {
|
||||
ret = next_event_type++;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!event->type)
|
||||
event->type = next_event_type++;
|
||||
else if (event->type > __TRACE_LAST_TYPE) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue