android_kernel_xiaomi_sdm845/kernel/trace
Steven Rostedt 361943ad0b ftrace: irqs off smp_processor_id() fix
The irqsoff function tracer did a __get_cpu_var to determine
if it should trace the function or not. The problem is that
__get_cpu_var can preempt between getting the CPU and reading
the cpu variable. This means that the cpu variable that is
being read is not from the cpu being run on.

At worst, this can give a false positive, where we trace the
function when we should not.  It will never give a false negative
since we only want to trace when interrupts are disabled
and we never preempt when they are.

This fix adds a check after reading the irq flags to only
trace if the interrupts are actually disabled. It also changes
the reading of the cpu variable to use a raw_smp_processor_id
since we now don't care if we preempt. We still catch that fact.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-05-23 20:39:30 +02:00
..
ftrace.c ftrace: add filter select functions to trace 2008-05-23 20:38:41 +02:00
Kconfig ftrace: dynamic enabling/disabling of function calls 2008-05-23 20:33:09 +02:00
Makefile ftrace: trace preempt off critical timings 2008-05-23 20:32:54 +02:00
trace_functions.c ftrace: function tracer 2008-05-23 20:32:13 +02:00
trace_irqsoff.c ftrace: irqs off smp_processor_id() fix 2008-05-23 20:39:30 +02:00
trace_sched_switch.c ftrace: add tracing of context switches 2008-05-23 20:32:27 +02:00
trace_sched_wakeup.c ftrace: tracer for scheduler wakeup latency 2008-05-23 20:32:36 +02:00
trace.c ftrace: convert single large buffer into single pages. 2008-05-23 20:38:51 +02:00
trace.h ftrace: convert single large buffer into single pages. 2008-05-23 20:38:51 +02:00