aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-03-04 18:20:36 -0500
committerSteven Rostedt <srostedt@redhat.com>2009-03-04 18:32:28 -0500
commite543ad76914abec1acf6631604a4154cd7a2ca6b (patch)
treea2d093fe45ecb663fc1f977c0efc812ec06e1b99 /kernel/trace/trace.c
parentefed792d6738964f399a508ef9e831cd60fa4657 (diff)
tracing: add cpu_file intialization for ftrace_dump
Impact: fix to ftrace_dump output corruption The commit: b04cc6b1f6398b0e0b60d37e27ce51b4899672ec tracing/core: introduce per cpu tracing files added a new field to the iterator called cpu_file. This was a handle to differentiate between the per cpu trace output files and the all cpu "trace" file. The all cpu "trace" file required setting this to TRACE_PIPE_ALL_CPU. The problem is that the ftrace_dump sets up its own iterator but was not updated to handle this change. The result was only CPU 0 printing out on crash and a lot of "<0>"'s also being printed. Reported-by: Thomas Gleixner <tglx@linuxtronix.de> Tested-by: Darren Hart <dvhtc@us.ibm.com> Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r--kernel/trace/trace.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index c8abbb0c8397..ab5cbcae43a1 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -3918,8 +3918,10 @@ void ftrace_dump(void)
3918 3918
3919 printk(KERN_TRACE "Dumping ftrace buffer:\n"); 3919 printk(KERN_TRACE "Dumping ftrace buffer:\n");
3920 3920
3921 /* Simulate the iterator */
3921 iter.tr = &global_trace; 3922 iter.tr = &global_trace;
3922 iter.trace = current_trace; 3923 iter.trace = current_trace;
3924 iter.cpu_file = TRACE_PIPE_ALL_CPU;
3923 3925
3924 /* 3926 /*
3925 * We need to stop all tracing on all CPUS to read the 3927 * We need to stop all tracing on all CPUS to read the