diff options
author | Steven Rostedt <rostedt@goodmis.org> | 2008-11-03 23:15:56 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-04 04:09:49 -0500 |
commit | 182e9f5f704ed6b9175142fe8da33c9ce0c52b52 (patch) | |
tree | 60e72119c74141cfb7b0b9b757b47d719138621f /kernel/trace/trace.c | |
parent | 8f0a056fcb2f83a069fb5d60c2383304b7456687 (diff) |
ftrace: insert in the ftrace_preempt_disable()/enable() functions
Impact: use new, consolidated APIs in ftrace plugins
This patch replaces the schedule safe preempt disable code with the
ftrace_preempt_disable() and ftrace_preempt_enable() safe functions.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index e4c40c868d67..3e7bf5eb9007 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -904,8 +904,7 @@ function_trace_call(unsigned long ip, unsigned long parent_ip) | |||
904 | return; | 904 | return; |
905 | 905 | ||
906 | pc = preempt_count(); | 906 | pc = preempt_count(); |
907 | resched = need_resched(); | 907 | resched = ftrace_preempt_disable(); |
908 | preempt_disable_notrace(); | ||
909 | local_save_flags(flags); | 908 | local_save_flags(flags); |
910 | cpu = raw_smp_processor_id(); | 909 | cpu = raw_smp_processor_id(); |
911 | data = tr->data[cpu]; | 910 | data = tr->data[cpu]; |
@@ -915,10 +914,7 @@ function_trace_call(unsigned long ip, unsigned long parent_ip) | |||
915 | trace_function(tr, data, ip, parent_ip, flags, pc); | 914 | trace_function(tr, data, ip, parent_ip, flags, pc); |
916 | 915 | ||
917 | atomic_dec(&data->disabled); | 916 | atomic_dec(&data->disabled); |
918 | if (resched) | 917 | ftrace_preempt_enable(resched); |
919 | preempt_enable_no_resched_notrace(); | ||
920 | else | ||
921 | preempt_enable_notrace(); | ||
922 | } | 918 | } |
923 | 919 | ||
924 | static struct ftrace_ops trace_ops __read_mostly = | 920 | static struct ftrace_ops trace_ops __read_mostly = |