riscv/ftrace: Add basic support
authorAlan Kao <nonerkao@gmail.com>
Mon, 18 Dec 2017 09:52:48 +0000 (17:52 +0800)
committerPalmer Dabbelt <palmer@dabbelt.com>
Wed, 31 Jan 2018 03:10:54 +0000 (19:10 -0800)
commit10626c32e3827bca560217966f5bd586c4e91584
treedb45aeec301859aa5885fba76298b9c272d5443e
parent5d44bf2065e169dd857a4207505210fce25743e6
riscv/ftrace: Add basic support

This patch contains basic ftrace support for RV64I platform.
Specifically, function tracer (HAVE_FUNCTION_TRACER), function graph
tracer (HAVE_FUNCTION_GRAPH_TRACER), and a frame pointer test
(HAVE_FUNCTION_GRAPH_FP_TEST) are implemented following the
instructions in Documentation/trace/ftrace-design.txt.

Note that the functions in both ftrace.c and setup.c should not be
hooked with the compiler's -pg option: to prevent infinite self-
referencing for the former, and to ignore early setup stuff for the
latter.

Signed-off-by: Alan Kao <alankao@andestech.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
arch/riscv/Kconfig
arch/riscv/include/asm/Kbuild
arch/riscv/include/asm/ftrace.h [new file with mode: 0644]
arch/riscv/kernel/Makefile
arch/riscv/kernel/ftrace.c [new file with mode: 0644]
arch/riscv/kernel/mcount.S [new file with mode: 0644]