提交 1ec7c484 编写于 作者: S Steven Rostedt 提交者: Steven Rostedt

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: NSteven Rostedt <rostedt@goodmis.org>
上级 29a67975
......@@ -898,6 +898,8 @@ static enum print_line_t trace_stack_print(struct trace_iterator *iter,
trace_assign_type(field, iter->ent);
for (i = 0; i < FTRACE_STACK_ENTRIES; i++) {
if (!field->caller[i])
break;
if (i) {
if (!trace_seq_puts(s, " <= "))
goto partial;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册