trace: stop all recording to ring buffer on ftrace_dump
authorSteven Rostedt <srostedt@redhat.com>
Wed, 14 Jan 2009 19:50:19 +0000 (14:50 -0500)
committerIngo Molnar <mingo@elte.hu>
Wed, 21 Jan 2009 14:21:30 +0000 (15:21 +0100)
Impact: limit ftrace dump output

Currently ftrace_dump only calls ftrace_kill that is a fast way
to prevent the function tracer functions from being called (just sets
a flag and clears the function to call, nothing else). It is better
to also turn off any recording to the ring buffers as well.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/trace/trace.c

index 1a1c5a6..4d89e84 100644 (file)
@@ -3770,6 +3770,7 @@ void ftrace_dump(void)
        dump_ran = 1;
 
        /* No turning back! */
        dump_ran = 1;
 
        /* No turning back! */
+       tracing_off();
        ftrace_kill();
 
        for_each_tracing_cpu(cpu) {
        ftrace_kill();
 
        for_each_tracing_cpu(cpu) {