diff options
author | Cody P Schafer <cody@linux.vnet.ibm.com> | 2013-10-23 14:49:57 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2013-11-06 10:03:11 -0500 |
commit | b2f974d6af9accfec11e69cc76d2ab9f0c7359e0 (patch) | |
tree | 23e54345bd0a6d4ca709bf104ce8f33ed6c44ccb | |
parent | d562aff93bfb530b0992141500a402d17081189d (diff) |
tracing: Open tracer when ftrace_dump_on_oops is used
With ftrace_dump_on_oops, we previously did not open the tracer in
question, sometimes causing the trace output to be useless.
For example, the function_graph tracer with tracing_thresh set dumped via
ftrace_dump_on_oops would show a series of '}' indented at different levels,
but no function names.
call trace->open() (and do a few other fixups copied from the normal dump
path) to make the output more intelligible.
Link: http://lkml.kernel.org/r/1382554197-16961-1-git-send-email-cody@linux.vnet.ibm.com
Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | kernel/trace/trace.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index f9fa42b180e3..eaacd3aab896 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -6276,6 +6276,17 @@ void trace_init_global_iter(struct trace_iterator *iter) | |||
6276 | iter->trace = iter->tr->current_trace; | 6276 | iter->trace = iter->tr->current_trace; |
6277 | iter->cpu_file = RING_BUFFER_ALL_CPUS; | 6277 | iter->cpu_file = RING_BUFFER_ALL_CPUS; |
6278 | iter->trace_buffer = &global_trace.trace_buffer; | 6278 | iter->trace_buffer = &global_trace.trace_buffer; |
6279 | |||
6280 | if (iter->trace && iter->trace->open) | ||
6281 | iter->trace->open(iter); | ||
6282 | |||
6283 | /* Annotate start of buffers if we had overruns */ | ||
6284 | if (ring_buffer_overruns(iter->trace_buffer->buffer)) | ||
6285 | iter->iter_flags |= TRACE_FILE_ANNOTATE; | ||
6286 | |||
6287 | /* Output in nanoseconds only if we are using a clock in nanoseconds. */ | ||
6288 | if (trace_clocks[iter->tr->clock_id].in_ns) | ||
6289 | iter->iter_flags |= TRACE_FILE_TIME_IN_NS; | ||
6279 | } | 6290 | } |
6280 | 6291 | ||
6281 | void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) | 6292 | void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) |