Skip to content

Add dynamic ftrace support for RISC-V platforms

Alan Kao lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest6 patches 3 repliesIn review
  2. v26 patches 2 repliesSuperseded
  3. v16 patches 5 repliesSuperseded

Changes in v3 from the cover letter

- Replace the nops at the tracer call sites into a "call ftrace_stub" instruction for better understanding (1/6 and 2/6)

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6riscv/ftrace: Add RECORD_MCOUNT supportarch/riscv/Kconfig arch/riscv/Makefile scripts/recordmcount.pl+9 -00 replies
2/6riscv/ftrace: Add dynamic function tracer supportarch/riscv/Kconfig arch/riscv/include/asm/ftrace.h arch/riscv/kernel/Makefile +3 more+211 -120 replies
3/6riscv/ftrace: Add dynamic function graph tracer supportarch/riscv/kernel/ftrace.c arch/riscv/kernel/mcount-dyn.S+88 -10 replies
4/6riscv/ftrace: Add ARCH_SUPPORTS_FTRACE_OPS supportarch/riscv/include/asm/ftrace.h arch/riscv/kernel/mcount-dyn.S+4 -00 replies
5/6riscv/ftrace: Add DYNAMIC_FTRACE_WITH_REGS supportarch/riscv/Kconfig arch/riscv/kernel/ftrace.c arch/riscv/kernel/mcount-dyn.S+142 -00 replies
6/6riscv/ftrace: Add HAVE_FUNCTION_GRAPH_RET_ADDR_PTR supportarch/riscv/include/asm/ftrace.h arch/riscv/kernel/ftrace.c arch/riscv/kernel/stacktrace.c+8 -10 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 0/6] Add dynamic ftrace support for RISC-V platforms

This patch set includes the building blocks of dynamic ftrace features for RISC-V machines.

Changes in v3:
- Replace the nops at the tracer call sites into a "call ftrace_stub" instruction for better understanding (1/6 and 2/6)

Changes in v2:
- Fix the return value as writing to kernel text goes wrong (2/6)
- Replace manual comparisons by calling memcmp (2/6)
- Simplify the conditional assignment in the Makefile (1/6)

Alan Kao (6):
riscv/ftrace: Add RECORD_MCOUNT support riscv/ftrace: Add dynamic function tracer support riscv/ftrace: Add dynamic function graph tracer support riscv/ftrace: Add ARCH_SUPPORTS_FTRACE_OPS support riscv/ftrace: Add DYNAMIC_FTRACE_WITH_REGS support riscv/ftrace: Add HAVE_FUNCTION_GRAPH_RET_ADDR_PTR support

 arch/riscv/Kconfig              |   3 +
 arch/riscv/Makefile             |   3 +
 arch/riscv/include/asm/ftrace.h |  47 ++++++++
 arch/riscv/kernel/Makefile      |   5 +-
 arch/riscv/kernel/ftrace.c      | 142 ++++++++++++++++++++++-
 arch/riscv/kernel/mcount-dyn.S  | 241 ++++++++++++++++++++++++++++++++++++++++
 arch/riscv/kernel/mcount.S      |  22 ++--
 arch/riscv/kernel/stacktrace.c  |   6 +
 scripts/recordmcount.pl         |   5 +
 9 files changed, 461 insertions(+), 13 deletions(-)
 create mode 100644 arch/riscv/kernel/mcount-dyn.S
Signature · 1 line
2.15.1