diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-04-10 13:52:20 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-04-14 12:58:00 -0400 |
commit | a59fd6027218bd7c994e39d14afe0242f895144f (patch) | |
tree | c22e6ff2924726319eac84c480eca72066bad660 /kernel/trace/trace_event_profile.c | |
parent | f42c85e74faa422cf0bc747ed808681145448f88 (diff) |
tracing/events: convert event call sites to use a link list
Impact: makes it possible to define events in modules
The events are created by reading down the section that they are linked
in by the macros. But this is not scalable to modules. This patch converts
the manipulations to use a global link list, and on boot up it adds
the items in the section to the list.
This change will allow modules to add their tracing events to the list as
well.
Note, this change alone does not permit modules to use the TRACE_EVENT macros,
but the change is needed for them to eventually do so.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_event_profile.c')
-rw-r--r-- | kernel/trace/trace_event_profile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/trace_event_profile.c b/kernel/trace/trace_event_profile.c index 199de9c74229..7bf2ad65eee5 100644 --- a/kernel/trace/trace_event_profile.c +++ b/kernel/trace/trace_event_profile.c | |||
@@ -11,7 +11,7 @@ int ftrace_profile_enable(int event_id) | |||
11 | { | 11 | { |
12 | struct ftrace_event_call *event; | 12 | struct ftrace_event_call *event; |
13 | 13 | ||
14 | for_each_event(event) { | 14 | list_for_each_entry(event, &ftrace_events, list) { |
15 | if (event->id == event_id) | 15 | if (event->id == event_id) |
16 | return event->profile_enable(event); | 16 | return event->profile_enable(event); |
17 | } | 17 | } |
@@ -23,7 +23,7 @@ void ftrace_profile_disable(int event_id) | |||
23 | { | 23 | { |
24 | struct ftrace_event_call *event; | 24 | struct ftrace_event_call *event; |
25 | 25 | ||
26 | for_each_event(event) { | 26 | list_for_each_entry(event, &ftrace_events, list) { |
27 | if (event->id == event_id) | 27 | if (event->id == event_id) |
28 | return event->profile_disable(event); | 28 | return event->profile_disable(event); |
29 | } | 29 | } |