diff options
author | Steven Rostedt <srostedt@redhat.com> | 2008-05-12 15:20:42 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-05-23 14:32:54 -0400 |
commit | 6cd8a4bb2f97527a9ceb30bc77ea4e959c6a95e3 (patch) | |
tree | 845af8f3c7f8956b4f3591759a0d67248af243a2 /arch | |
parent | 81d68a96a39844853b37f20cc8282d9b65b78ef3 (diff) |
ftrace: trace preempt off critical timings
Add preempt off timings. A lot of kernel core code is taken from the RT patch
latency trace that was written by Ingo Molnar.
This adds "preemptoff" and "preemptirqsoff" to /debugfs/tracing/available_tracers
Now instead of just tracing irqs off, preemption off can be selected
to be recorded.
When this is selected, it shares the same files as irqs off timings.
One can either trace preemption off, irqs off, or one or the other off.
By echoing "preemptoff" into /debugfs/tracing/current_tracer, recording
of preempt off only is performed. "irqsoff" will only record the time
irqs are disabled, but "preemptirqsoff" will take the total time irqs
or preemption are disabled. Runtime switching of these options is now
supported by simpling echoing in the appropriate trace name into
/debugfs/tracing/current_tracer.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/process_32.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index f8476dfbb60d..a30aa1f2607a 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -185,7 +185,10 @@ void cpu_idle(void) | |||
185 | 185 | ||
186 | local_irq_disable(); | 186 | local_irq_disable(); |
187 | __get_cpu_var(irq_stat).idle_timestamp = jiffies; | 187 | __get_cpu_var(irq_stat).idle_timestamp = jiffies; |
188 | /* Don't trace irqs off for idle */ | ||
189 | stop_critical_timings(); | ||
188 | idle(); | 190 | idle(); |
191 | start_critical_timings(); | ||
189 | } | 192 | } |
190 | tick_nohz_restart_sched_tick(); | 193 | tick_nohz_restart_sched_tick(); |
191 | preempt_enable_no_resched(); | 194 | preempt_enable_no_resched(); |