From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Cody P Schafer <cody@linux.vnet.ibm.com>
Subject: [for-next][PATCH 1/5] tracing: Open tracer when ftrace_dump_on_oops is used
Date: Wed, 06 Nov 2013 23:00:03 -0500 [thread overview]
Message-ID: <20131107040050.054159903@goodmis.org> (raw)
In-Reply-To: 20131107040002.605895766@goodmis.org
[-- Attachment #1: 0001-tracing-Open-tracer-when-ftrace_dump_on_oops-is-used.patch --]
[-- Type: text/plain, Size: 1571 bytes --]
From: Cody P Schafer <cody@linux.vnet.ibm.com>
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>
---
kernel/trace/trace.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index f9fa42b..eaacd3a 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -6276,6 +6276,17 @@ void trace_init_global_iter(struct trace_iterator *iter)
iter->trace = iter->tr->current_trace;
iter->cpu_file = RING_BUFFER_ALL_CPUS;
iter->trace_buffer = &global_trace.trace_buffer;
+
+ if (iter->trace && iter->trace->open)
+ iter->trace->open(iter);
+
+ /* Annotate start of buffers if we had overruns */
+ if (ring_buffer_overruns(iter->trace_buffer->buffer))
+ iter->iter_flags |= TRACE_FILE_ANNOTATE;
+
+ /* Output in nanoseconds only if we are using a clock in nanoseconds. */
+ if (trace_clocks[iter->tr->clock_id].in_ns)
+ iter->iter_flags |= TRACE_FILE_TIME_IN_NS;
}
void ftrace_dump(enum ftrace_dump_mode oops_dump_mode)
--
1.8.4.rc3
next prev parent reply other threads:[~2013-11-07 4:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-07 4:00 [for-next][PATCH 0/5] tracing: More updates for 3.13 Steven Rostedt
2013-11-07 4:00 ` Steven Rostedt [this message]
2013-11-07 4:00 ` [for-next][PATCH 2/5] tracing: Add helper function tracing_is_disabled() Steven Rostedt
2013-11-07 4:00 ` [for-next][PATCH 3/5] tracing: Do not assign filp->private_data to freed memory Steven Rostedt
2013-11-07 4:00 ` [for-next][PATCH 4/5] tracing: Remove unused function ftrace_off_permanent() Steven Rostedt
2013-11-07 4:00 ` [for-next][PATCH 5/5] tracing: Do not use signed enums with unsigned long long in fgragh output Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131107040050.054159903@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=cody@linux.vnet.ibm.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).