Skip to content

Support ftrace on NDS32 architecture

Zong Li lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6nds32/ftrace: Support static function tracerarch/nds32/Kconfig arch/nds32/Makefile arch/nds32/include/asm/ftrace.h +2 more+59 -01 reply
2/6nds32/ftrace: Support static function graph tracerarch/nds32/Kconfig arch/nds32/kernel/ftrace.c+70 -00 replies
3/6nds32/ftrace: Add RECORD_MCOUNT supportarch/nds32/Kconfig scripts/recordmcount.pl+4 -00 replies
4/6nds32/ftrace: Support dynamic function tracerarch/nds32/Kconfig arch/nds32/include/asm/ftrace.h arch/nds32/kernel/ftrace.c+191 -00 replies
5/6nds32/ftrace: Support dynamic function graph tracerarch/nds32/kernel/ftrace.c+36 -00 replies
6/6nds32/stack: Get real return address by using ftrace_graph_ret_addrarch/nds32/kernel/stacktrace.c arch/nds32/kernel/traps.c+10 -240 replies

Reviews trailers per patch

None of the 6 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchGreentime Hu
SeriesA-b
1/6
2/6
3/6
4/6
5/6
6/6

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

Read the v1 thread

Cover letter [PATCH 0/6] Support ftrace on NDS32 architecture

This patch set implements the ftrace function and function graph tracer on NDS32 architecture. We try to use C code to do everything, so we don't need to separate the implementation to assembly code and C code, we just need one ftrace.c file.

In mcount function, we use the prologue/epilogue which generated by compiler to help us to save/restore the status. On the other hand, we use naked attribute of gcc to avoid to generate the prologue/epilogue when we don't need it(such as ftrace_stub and return_to_handler).

We pass the following tests:

1. FTRACE_STARTUP_TEST: PASS

2. tools/testing/selftests/ftrace/:

 # of passed:  28
 # of failed:  1
 # of unresolved:  0
 # of untested:  0
 # of unsupported:  38
 # of xfailed:  0
 # of undefined(test bug):  0

The failed case is func-filter-glob.tc.
When setting the '*aw*lock' to the set_ftrace_filter in this test case, we got the error because we have no these functions such as _raw_spin_lock, _raw_spin_trylock and so on in our kernel.

Zong Li (6):
nds32/ftrace: Support static function tracer nds32/ftrace: Support static function graph tracer nds32/ftrace: Add RECORD_MCOUNT support
nds32/ftrace: Support dynamic function tracer nds32/ftrace: Support dynamic function graph tracer nds32/stack: Get real return address by using ftrace_graph_ret_addr

 arch/nds32/Kconfig              |   4 +
 arch/nds32/Makefile             |   4 +
 arch/nds32/include/asm/ftrace.h |  46 +++++++
 arch/nds32/kernel/Makefile      |   6 +
 arch/nds32/kernel/ftrace.c      | 297 ++++++++++++++++++++++++++++++++++++++++
 arch/nds32/kernel/stacktrace.c  |   4 +
 arch/nds32/kernel/traps.c       |  30 +---
 scripts/recordmcount.pl         |   3 +
 8 files changed, 370 insertions(+), 24 deletions(-)
 create mode 100644 arch/nds32/include/asm/ftrace.h
 create mode 100644 arch/nds32/kernel/ftrace.c
Signature · 1 line
2.7.4