public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ftrace, orc, x86, tracing: Fix stack traces again
@ 2018-01-23 18:32 Steven Rostedt
  2018-01-23 18:32 ` [PATCH 1/3] x86/ftrace: Fix ORC unwinding from ftrace handlers Steven Rostedt
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Steven Rostedt @ 2018-01-23 18:32 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Andrew Morton, Thomas Gleixner, H. Peter Anvin,
	Nikolay Borisov, Josh Poimboeuf


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(-)

^ permalink raw reply	[flat|nested] 10+ messages in thread
* [PATCH 0/3] [GIT PULL] ftrace,orc,x86: Handle ftrace dynamically allocated trampolines
@ 2018-01-24 13:12 Steven Rostedt
  2018-01-24 13:12 ` [PATCH 3/3] tracing: Update stack trace skipping for ORC unwinder Steven Rostedt
  0 siblings, 1 reply; 10+ messages in thread
From: Steven Rostedt @ 2018-01-24 13:12 UTC (permalink / raw)
  To: linux-kernel
  Cc: Linus Torvalds, Ingo Molnar, Andrew Morton, Thomas Gleixner,
	H. Peter Anvin, Josh Poimboeuf, Nikolay Borisov


Linus,

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. Which means all ftrace stack tracing that
happens from the function tracer would produce no results (that includes
killing the max stack size tracer).  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 were out of
whack. I went through and fixed them up.

Please pull the latest trace-v4.15-rc9 tree, which can be found at:


  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
trace-v4.15-rc9

Tag SHA1: b3e8c85438a8abb5a41864103a52c48787e610ce
Head SHA1: 2ee5b92a2598d9e403337185fdf88f661dee8616


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               | 29 +++++++++++++---------
 kernel/trace/trace.c                | 34 ++++++++++++++-----------
 kernel/trace/trace_events_trigger.c | 13 ++++++++--
 kernel/trace/trace_functions.c      | 49 +++++++++++++++++++++++++++----------
 8 files changed, 152 insertions(+), 52 deletions(-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-01-24 13:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-23 18:32 [PATCH 0/3] ftrace, orc, x86, tracing: Fix stack traces again Steven Rostedt
2018-01-23 18:32 ` [PATCH 1/3] x86/ftrace: Fix ORC unwinding from ftrace handlers Steven Rostedt
2018-01-23 18:32 ` [PATCH 2/3] ftrace, orc, x86: Handle ftrace dynamically allocated trampolines Steven Rostedt
2018-01-23 18:32 ` [PATCH 3/3] tracing: Update stack trace skipping for ORC unwinder Steven Rostedt
2018-01-24  7:46 ` [PATCH 0/3] ftrace, orc, x86, tracing: Fix stack traces again Ingo Molnar
2018-01-24  8:49   ` Steven Rostedt
2018-01-24 10:04     ` Steven Rostedt
2018-01-24 12:54       ` Steven Rostedt
2018-01-24  8:59 ` Nikolay Borisov
  -- strict thread matches above, loose matches on Subject: below --
2018-01-24 13:12 [PATCH 0/3] [GIT PULL] ftrace,orc,x86: Handle ftrace dynamically allocated trampolines Steven Rostedt
2018-01-24 13:12 ` [PATCH 3/3] tracing: Update stack trace skipping for ORC unwinder Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox