tracing/ftrace: don't insert TRACE_PRINT during selftests
authorFrederic Weisbecker <fweisbec@gmail.com>
Thu, 4 Dec 2008 22:47:35 +0000 (23:47 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 5 Dec 2008 13:47:43 +0000 (14:47 +0100)
commitff32504fdc56407654584ef187b20022c94a3486
tree71f265bbc27f603732e3791bb24896e450489083
parent970987beb9c99ca806edc464518d411cc399fb4d
tracing/ftrace: don't insert TRACE_PRINT during selftests

Impact: fix tracer selfstests false results

After setting a ftrace_printk somewhere in th kernel, I saw the
Function tracer selftest failing.

When a selftest occurs, the ring buffer is lurked to see if
some entries were inserted. But concurrent insertion such as
ftrace_printk could occured at the same time and could give
false positive or negative results.

This patch prevent prevent from TRACE_PRINT entries insertion
during selftests.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/trace/trace.c