* [PATCH] ftrace: only trace preempt off with preempt tracer
@ 2008-07-15 13:53 Steven Rostedt
2008-07-18 16:57 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Steven Rostedt @ 2008-07-15 13:53 UTC (permalink / raw)
To: LKML
Cc: Linus Torvalds, Andrew Morton, Ingo Molnar, Thomas Gleixner,
Peter Zijlstra
When PREEMPT_TRACER and IRQSOFF_TRACER are both configured and irqsoff
tracer is running, the preempt_off sections might also be traced.
Thanks to Andrew Morton for pointing out my mistake of spin_lock disabling
interrupts while he was reviewing ftrace.txt. Seems that my example I used
actually hit this bug.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
---
kernel/trace/trace_irqsoff.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Index: linus.git/kernel/trace/trace_irqsoff.c
===================================================================
--- linus.git.orig/kernel/trace/trace_irqsoff.c 2008-07-14 23:08:16.000000000 -0400
+++ linus.git/kernel/trace/trace_irqsoff.c 2008-07-15 00:22:59.000000000 -0400
@@ -337,12 +337,14 @@ EXPORT_SYMBOL(trace_hardirqs_off_caller)
#ifdef CONFIG_PREEMPT_TRACER
void trace_preempt_on(unsigned long a0, unsigned long a1)
{
- stop_critical_timing(a0, a1);
+ if (preempt_trace())
+ stop_critical_timing(a0, a1);
}
void trace_preempt_off(unsigned long a0, unsigned long a1)
{
- start_critical_timing(a0, a1);
+ if (preempt_trace())
+ start_critical_timing(a0, a1);
}
#endif /* CONFIG_PREEMPT_TRACER */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ftrace: only trace preempt off with preempt tracer
2008-07-15 13:53 [PATCH] ftrace: only trace preempt off with preempt tracer Steven Rostedt
@ 2008-07-18 16:57 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-07-18 16:57 UTC (permalink / raw)
To: Steven Rostedt
Cc: LKML, Linus Torvalds, Andrew Morton, Thomas Gleixner, Peter Zijlstra
* Steven Rostedt <rostedt@goodmis.org> wrote:
> When PREEMPT_TRACER and IRQSOFF_TRACER are both configured and irqsoff
> tracer is running, the preempt_off sections might also be traced.
>
> Thanks to Andrew Morton for pointing out my mistake of spin_lock
> disabling interrupts while he was reviewing ftrace.txt. Seems that my
> example I used actually hit this bug.
applied to tip/tracing/urgent - thanks Steve.
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-18 16:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-15 13:53 [PATCH] ftrace: only trace preempt off with preempt tracer Steven Rostedt
2008-07-18 16:57 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®