aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-05-14 23:40:06 -0400
committerSteven Rostedt <rostedt@goodmis.org>2009-05-14 23:40:06 -0400
commit1ec7c4849c214fc78b023230264399836ea3b245 (patch)
tree52a53fcd4d7ea0cd94b65bd8c6bf20402e3356af /kernel/trace
parent29a679754b1a2581ee456eada6c2de7ce95068bb (diff)
tracing: stop stack trace on first empty entry
The stack tracer stores eight entries in the ring buffer when an event traces the stack. The output outputs all eight entries regardless of how many entries were recorded. This patch breaks out of the loop when a null entry is discovered. [ Impact: only print the stack that is recorded ] Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace_output.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
index 8bd9a2c1a46a..489c0e8ada09 100644
--- a/kernel/trace/trace_output.c
+++ b/kernel/trace/trace_output.c
@@ -898,6 +898,8 @@ static enum print_line_t trace_stack_print(struct trace_iterator *iter,
898 trace_assign_type(field, iter->ent); 898 trace_assign_type(field, iter->ent);
899 899
900 for (i = 0; i < FTRACE_STACK_ENTRIES; i++) { 900 for (i = 0; i < FTRACE_STACK_ENTRIES; i++) {
901 if (!field->caller[i])
902 break;
901 if (i) { 903 if (i) {
902 if (!trace_seq_puts(s, " <= ")) 904 if (!trace_seq_puts(s, " <= "))
903 goto partial; 905 goto partial;