diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-09-19 11:27:32 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-19 11:28:41 +0200 |
commit | 929bf0d0156562ce631728b6fa53d68004d456d2 (patch) | |
tree | 739063990a8077b29ef97e69d73bce94573daae4 /kernel/trace/trace_event_profile.c | |
parent | def0a9b2573e00ab0b486cb5382625203ab4c4a6 (diff) | |
parent | 202c4675c55ddf6b443c7e057d2dff6b42ef71aa (diff) |
Merge branch 'linus' into perfcounters/core
Merge reason: Bring in tracing changes we depend on.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace_event_profile.c')
-rw-r--r-- | kernel/trace/trace_event_profile.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/trace/trace_event_profile.c b/kernel/trace/trace_event_profile.c index 11ba5bb4ed0..55a25c933d1 100644 --- a/kernel/trace/trace_event_profile.c +++ b/kernel/trace/trace_event_profile.c @@ -5,6 +5,7 @@ * */ +#include <linux/module.h> #include "trace.h" int ftrace_profile_enable(int event_id) @@ -14,7 +15,8 @@ int ftrace_profile_enable(int event_id) mutex_lock(&event_mutex); list_for_each_entry(event, &ftrace_events, list) { - if (event->id == event_id && event->profile_enable) { + if (event->id == event_id && event->profile_enable && + try_module_get(event->mod)) { ret = event->profile_enable(event); break; } @@ -32,6 +34,7 @@ void ftrace_profile_disable(int event_id) list_for_each_entry(event, &ftrace_events, list) { if (event->id == event_id) { event->profile_disable(event); + module_put(event->mod); break; } } |