aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_stack.c
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2008-11-03 23:15:56 -0500
committerIngo Molnar <mingo@elte.hu>2008-11-04 10:09:49 +0100
commit182e9f5f704ed6b9175142fe8da33c9ce0c52b52 (patch)
tree60e72119c74141cfb7b0b9b757b47d719138621f /kernel/trace/trace_stack.c
parent8f0a056fcb2f83a069fb5d60c2383304b7456687 (diff)
downloadkernel_goldelico_gta04-182e9f5f704ed6b9175142fe8da33c9ce0c52b52.zip
kernel_goldelico_gta04-182e9f5f704ed6b9175142fe8da33c9ce0c52b52.tar.gz
kernel_goldelico_gta04-182e9f5f704ed6b9175142fe8da33c9ce0c52b52.tar.bz2
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_stack.c')
-rw-r--r--kernel/trace/trace_stack.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c
index be682b6..d39e8b7 100644
--- a/kernel/trace/trace_stack.c
+++ b/kernel/trace/trace_stack.c
@@ -107,8 +107,7 @@ stack_trace_call(unsigned long ip, unsigned long parent_ip)
if (unlikely(!ftrace_enabled || stack_trace_disabled))
return;
- resched = need_resched();
- preempt_disable_notrace();
+ resched = ftrace_preempt_disable();
cpu = raw_smp_processor_id();
/* no atomic needed, we only modify this variable by this cpu */
@@ -120,10 +119,7 @@ stack_trace_call(unsigned long ip, unsigned long parent_ip)
out:
per_cpu(trace_active, cpu)--;
/* prevent recursion in schedule */
- if (resched)
- preempt_enable_no_resched_notrace();
- else
- preempt_enable_notrace();
+ ftrace_preempt_enable(resched);
}
static struct ftrace_ops trace_ops __read_mostly =