Skip to content

RFC powerpc64: Add support for ftrace direct calls

Naveen N. Rao linuxppc-dev lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest14 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14ftrace: Fix updating FTRACE_FL_TRAMPkernel/trace/ftrace.c+21 -12 replies
2/14ftrace: Fix DYNAMIC_FTRACE_WITH_DIRECT_CALLS dependencykernel/trace/Kconfig+1 -11 reply
3/14ftrace: Fix cleanup in error path of register_ftrace_direct()kernel/trace/ftrace.c+1 -21 reply
4/14ftrace: Remove ftrace_find_direct_func()include/linux/ftrace.h kernel/trace/ftrace.c+4 -850 replies
5/14ftrace: Add architectural helpers for [un]register_ftrace_direct()include/linux/ftrace.h kernel/trace/ftrace.c+23 -60 replies
6/14powerpc: Add support for CONFIG_HAVE_FUNCTION_ARG_ACCESS_APIarch/powerpc/Kconfig arch/powerpc/include/asm/ptrace.h+32 -00 replies
7/14powerpc/ftrace: Remove dead codearch/powerpc/kernel/trace/ftrace.c+0 -80 replies
8/14powerpc/ftrace: Use FTRACE_REGS_ADDR to identify the correct ftrace trampolinearch/powerpc/kernel/trace/ftrace.c+2 -100 replies
9/14powerpc/ftrace: Use a hash table for tracking ftrace stubsarch/powerpc/kernel/trace/ftrace.c+33 -420 replies
10/14powerpc/ftrace: Drop assumptions about ftrace trampoline targetarch/powerpc/kernel/trace/ftrace.c+86 -210 replies
11/14powerpc/ftrace: Use GPR save/restore macros in ftrace_graph_caller()arch/powerpc/kernel/trace/ftrace_64_mprofile.S+7 -210 replies
12/14powerpc/ftrace: Drop saving LR to stack save area for -mprofile-kernelarch/powerpc/kernel/trace/ftrace_64_mprofile.S+0 -20 replies
13/14powerpc/ftrace: Add support for register_ftrace_direct() for MPROFILE_KERNELarch/powerpc/Kconfig arch/powerpc/include/asm/ftrace.h arch/powerpc/kernel/trace/ftrace.c +1 more+182 -130 replies
14/14samples/ftrace: Add powerpc support for ftrace direct samplessamples/Kconfig samples/ftrace/ftrace-direct-modify.c samples/ftrace/ftrace-direct-too.c +1 more+144 -90 replies

Reviews trailers per patch

1 of 14 patches has a Reviewed-by or Acked-by.

PatchSteven Rostedt (VMware)
1/14
2/14
3/14R-b
4/14
5/14
6/14
7/14
8/14
9/14
10/14
11/14
12/14
13/14
14/14

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC PATCH 00/14] powerpc64: Add support for ftrace direct calls

This series adds support for DYNAMIC_FTRACE_WITH_DIRECT_CALLS for powerpc64le.

This is mostly working fine for me, except for a soft lockup I see with the ftrace direct selftest. It happens when irqsoff tracer is being tested with the ftrace direct modules. This appears to be an existing upstream issue since I am able to reproduce the lockup without these patches. I will be looking into that to see if I can figure out the cause of those lockups.

In the meantime, I would appreciate a review of these patches.

- Naveen

Naveen N. Rao (14):
ftrace: Fix updating FTRACE_FL_TRAMP
ftrace: Fix DYNAMIC_FTRACE_WITH_DIRECT_CALLS dependency
ftrace: Fix cleanup in error path of register_ftrace_direct()
ftrace: Remove ftrace_find_direct_func()
ftrace: Add architectural helpers for [un]register_ftrace_direct()
powerpc: Add support for CONFIG_HAVE_FUNCTION_ARG_ACCESS_API powerpc/ftrace: Remove dead code
powerpc/ftrace: Use FTRACE_REGS_ADDR to identify the correct ftrace
trampoline
powerpc/ftrace: Use a hash table for tracking ftrace stubs powerpc/ftrace: Drop assumptions about ftrace trampoline target powerpc/ftrace: Use GPR save/restore macros in ftrace_graph_caller() powerpc/ftrace: Drop saving LR to stack save area for -mprofile-kernel powerpc/ftrace: Add support for register_ftrace_direct() for
MPROFILE_KERNEL
samples/ftrace: Add powerpc support for ftrace direct samples

 arch/powerpc/Kconfig                          |   2 +
 arch/powerpc/include/asm/ftrace.h             |  14 +
 arch/powerpc/include/asm/ptrace.h             |  31 ++
 arch/powerpc/kernel/trace/ftrace.c            | 314 +++++++++++++-----
 .../powerpc/kernel/trace/ftrace_64_mprofile.S |  70 ++--
 include/linux/ftrace.h                        |   7 +-
 kernel/trace/Kconfig                          |   2 +-
 kernel/trace/ftrace.c                         | 130 +++-----
 samples/Kconfig                               |   2 +-
 samples/ftrace/ftrace-direct-modify.c         |  58 ++++
 samples/ftrace/ftrace-direct-too.c            |  48 ++-
 samples/ftrace/ftrace-direct.c                |  45 ++-
 12 files changed, 519 insertions(+), 204 deletions(-)

base-commit: 4c202167192a77481310a3cacae9f12618b92216

Signature · 1 line
2.25.4