summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_functions_graph.c
diff options
context:
space:
mode:
authorSteven Rostedt2011-06-15 01:02:29 +0200
committerSteven Rostedt2011-07-08 04:26:27 +0200
commite4a3f541f0b67fdad98b326c851dfe7f4b6b6dad (patch)
treee93b858ab3313374d23c4ebadc5077816f1894f2 /kernel/trace/trace_functions_graph.c
parenttracing, x86/irq: Do not trace arch_local_{*,irq_*}() functions (diff)
downloadkernel-qcow2-linux-e4a3f541f0b67fdad98b326c851dfe7f4b6b6dad.tar.gz
kernel-qcow2-linux-e4a3f541f0b67fdad98b326c851dfe7f4b6b6dad.tar.xz
kernel-qcow2-linux-e4a3f541f0b67fdad98b326c851dfe7f4b6b6dad.zip
tracing: Still trace filtered irq functions when irq trace is disabled
If a function is set to be traced by the set_graph_function, but the option funcgraph-irqs is zero, and the traced function happens to be called from a interrupt, it will not be traced. The point of funcgraph-irqs is to not trace interrupts when we are preempted by an irq, not to not trace functions we want to trace that happen to be *in* a irq. Luckily the current->trace_recursion element is perfect to add a flag to help us be able to trace functions within an interrupt even when we are not tracing interrupts that preempt the trace. Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com> Tested-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_functions_graph.c')
-rw-r--r--kernel/trace/trace_functions_graph.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
index e8d6bb55d719..a7d2a4c653d8 100644
--- a/kernel/trace/trace_functions_graph.c
+++ b/kernel/trace/trace_functions_graph.c
@@ -227,7 +227,7 @@ int __trace_graph_entry(struct trace_array *tr,
static inline int ftrace_graph_ignore_irqs(void)
{
- if (!ftrace_graph_skip_irqs)
+ if (!ftrace_graph_skip_irqs || trace_recursion_test(TRACE_IRQ_BIT))
return 0;
return in_irq();