Skip to content

Commit

Permalink
tracing: Have stack tracer trace full stack
Browse files Browse the repository at this point in the history
The stack tracer traces every function call checking the current stack (in
non interrupt context), looking for the deepest stack, and saving it when it
finds a new max depth. The problem is that it calls save_stack_trace(), and
with the new ORC unwinder, it can skip too much. As it looks at the ip of
the function call in the backtrace to find where it should start, it doesn't
need to skip anything.

The stack trace selftest would fail when the kernel was complied with the
ORC UNDWINDER enabled. Without skipping functions when doing the stack
trace, it now passes again.

Signed-off-by: Steven Rostedt (VMware) <[email protected]>
  • Loading branch information
rostedt committed Oct 27, 2018
1 parent da387e5 commit a2acce5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/trace/trace_stack.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ check_stack(unsigned long ip, unsigned long *stack)
stack_trace_max_size = this_size;

stack_trace_max.nr_entries = 0;
stack_trace_max.skip = 3;
stack_trace_max.skip = 0;

save_stack_trace(&stack_trace_max);

Expand Down

0 comments on commit a2acce5

Please sign in to comment.