linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/6] powerpc: Stack tracer fixes
@ 2021-05-21  6:48 Naveen N. Rao
  2021-05-21  6:48 ` [RFC PATCH 1/6] trace/stack: Move code to save the stack trace into a separate function Naveen N. Rao
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Naveen N. Rao @ 2021-05-21  6:48 UTC (permalink / raw)
  To: Steven Rostedt, Michael Ellerman, Michal Suchanek, Torsten Duwe
  Cc: linuxppc-dev, linux-kernel

While the stack tracer worked fine with ppc64 ELFv1 ABI, it was never 
ported/enabled to run properly with ppc64 ELFv2 ABI, -mprofile-kernel in 
particular. The primary issue is that the call to ftrace happens before 
a function sets up its own stackframe. Due to this, the traced function 
never shows up in the stack trace. This produces confusing results, 
especially with the stack trace filter and is evident with the selftest 
failure. This is also an issue on ppc32.

The first two commits add support to the stack tracer for powerpc. This 
support utilizes the powerpc ABI to produce reliable stack traces, as 
well as to determine stackframe sizes.

Patches 3, 4 and 6 add support for decoding the traced function name in 
various stack traces and to show the same.

Patch 5 makes this change for livepatching and I am a bit unsure of this 
change. More details in patch 5.

- Naveen


Naveen N. Rao (6):
  trace/stack: Move code to save the stack trace into a separate
    function
  powerpc/trace: Add support for stack tracer
  powerpc: Indicate traced function name in show_stack()
  powerpc/perf: Include traced function in the callchain
  powerpc/stacktrace: Include ftraced function in
    arch_stack_walk_reliable()
  powerpc/stacktrace: Include ftraced function in arch_stack_walk()

 arch/powerpc/include/asm/ftrace.h  | 18 ++++++
 arch/powerpc/kernel/process.c      |  3 +
 arch/powerpc/kernel/stacktrace.c   |  8 +++
 arch/powerpc/kernel/trace/ftrace.c | 70 +++++++++++++++++++++
 arch/powerpc/perf/callchain.c      |  5 ++
 include/linux/ftrace.h             |  8 +++
 kernel/trace/trace_stack.c         | 98 ++++++++++++++++--------------
 7 files changed, 164 insertions(+), 46 deletions(-)


base-commit: 258eb1f3aaa9face35e613c229c1337263491ea0
-- 
2.30.2


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

end of thread, other threads:[~2021-06-02 14:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-21  6:48 [RFC PATCH 0/6] powerpc: Stack tracer fixes Naveen N. Rao
2021-05-21  6:48 ` [RFC PATCH 1/6] trace/stack: Move code to save the stack trace into a separate function Naveen N. Rao
2021-06-01 15:28   ` Steven Rostedt
2021-06-02 10:35     ` Naveen N. Rao
2021-06-02 14:09       ` Steven Rostedt
2021-05-21  6:48 ` [RFC PATCH 2/6] powerpc/trace: Add support for stack tracer Naveen N. Rao
2021-06-01 13:51   ` Naveen N. Rao
2021-05-21  6:48 ` [RFC PATCH 3/6] powerpc: Indicate traced function name in show_stack() Naveen N. Rao
2021-05-21  6:48 ` [RFC PATCH 4/6] powerpc/perf: Include traced function in the callchain Naveen N. Rao
2021-05-21  6:48 ` [RFC PATCH 5/6] powerpc/stacktrace: Include ftraced function in arch_stack_walk_reliable() Naveen N. Rao
2021-05-21  6:48 ` [RFC PATCH 6/6] powerpc/stacktrace: Include ftraced function in arch_stack_walk() Naveen N. Rao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).