aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/ftrace.c
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2008-12-05 21:43:41 -0500
committerIngo Molnar <mingo@elte.hu>2008-12-08 09:11:45 -0500
commit380c4b1411ccd6885f92b2c8ceb08433a720f44e (patch)
treef3b571e1caff2de3e6b4cace87c2b1ec332667d7 /arch/x86/kernel/ftrace.c
parent8e1b82e0866befaa0b2920be296c6e4c3fc7f422 (diff)
tracing/function-graph-tracer: append the tracing_graph_flag
Impact: Provide a way to pause the function graph tracer As suggested by Steven Rostedt, the previous patch that prevented from spinlock function tracing shouldn't use the raw_spinlock to fix it. It's much better to follow lockdep with normal spinlock, so this patch adds a new flag for each task to make the function graph tracer able to be paused. We also can send an ftrace_printk whithout worrying of the irrelevant traced spinlock during insertion. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/ftrace.c')
-rw-r--r--arch/x86/kernel/ftrace.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
index f98c4076a170..1b43086b097a 100644
--- a/arch/x86/kernel/ftrace.c
+++ b/arch/x86/kernel/ftrace.c
@@ -476,7 +476,10 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
476 &return_to_handler; 476 &return_to_handler;
477 477
478 /* Nmi's are currently unsupported */ 478 /* Nmi's are currently unsupported */
479 if (atomic_read(&in_nmi)) 479 if (unlikely(atomic_read(&in_nmi)))
480 return;
481
482 if (unlikely(atomic_read(&current->tracing_graph_pause)))
480 return; 483 return;
481 484
482 /* 485 /*