Skip to content

ftrace, orc, x86, tracing: Fix stack traces again

Steven Rostedt lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3x86/ftrace: Fix ORC unwinding from ftrace handlersarch/x86/kernel/Makefile arch/x86/kernel/ftrace_64.S+19 -100 replies
2/3ftrace, orc, x86: Handle ftrace dynamically allocated trampolinesarch/x86/kernel/unwind_orc.c include/linux/ftrace.h kernel/trace/ftrace.c+64 -120 replies
3/3tracing: Update stack trace skipping for ORC unwinderkernel/trace/trace.c kernel/trace/trace_events_trigger.c kernel/trace/trace_functions.c+67 -290 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] ftrace, orc, x86, tracing: Fix stack traces again

With the new ORC unwinder, ftrace stack tracing became disfunctional.

One was that ORC didn't know how to handle the ftrace callbacks in general (which Josh fixed). The other was that ORC would just bail if it hit a dynamically allocated trampoline. I added a check to the ORC unwinder to see if the trampoline belonged to ftrace, and if it did, use the orc entry of the static trampoline that was used to create the dynamic one (it would be identical).

Finally, I noticed that the skip values of the stack tracing is out of whack. I went through and fixed them.

Anyone have any issues with these patches? I'm starting my tests on them now and if all goes well, I plan on pushing them to Linus hopefully tonight.

Thanks!

-- Steve

Josh Poimboeuf (1):
x86/ftrace: Fix ORC unwinding from ftrace handlers

Steven Rostedt (VMware) (2):
ftrace, orc, x86: Handle ftrace dynamically allocated trampolines
tracing: Update stack trace skipping for ORC unwinder

----

 arch/x86/kernel/Makefile            |  5 +++-
 arch/x86/kernel/ftrace_64.S         | 24 +++++++++++-------
 arch/x86/kernel/unwind_orc.c        | 48 +++++++++++++++++++++++++++++++++++-
 include/linux/ftrace.h              |  2 ++
 kernel/trace/ftrace.c               | 26 +++++++++++---------
 kernel/trace/trace.c                | 34 ++++++++++++++-----------
 kernel/trace/trace_events_trigger.c | 13 ++++++++--
 kernel/trace/trace_functions.c      | 49 +++++++++++++++++++++++++++----------
 8 files changed, 150 insertions(+), 51 deletions(-)