diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2022-01-25 15:55:24 +0100 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2022-02-09 09:13:59 +0100 |
commit | 41918ec82eb6f80c8b401422f27ca76c85aa0cb7 (patch) | |
tree | 1bd1010a1e6e5a52d3c4ed22d768f863ce10dc6a /arch/arm/include/asm/ftrace.h | |
parent | 538b9265c063f081ca6b1228d242575a1db60711 (diff) | |
download | linux-41918ec82eb6f80c8b401422f27ca76c85aa0cb7.tar.bz2 |
ARM: ftrace: enable the graph tracer with the EABI unwinder
Enable the function graph tracer in combination with the EABI unwinder,
so that Thumb2 builds or Clang ARM builds can make use of it.
This involves using the unwinder to locate the return address of an
instrumented function on the stack, so that it can be overridden and
made to refer to the ftrace handling routines that need to be called at
function return.
Given that for these builds, it is not guaranteed that the value of the
link register is stored on the stack, fall back to the stack slot that
will be used by the ftrace exit code to restore LR in the instrumented
function's execution context.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'arch/arm/include/asm/ftrace.h')
-rw-r--r-- | arch/arm/include/asm/ftrace.h | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h index b4f5fab6b04e..5358aad67831 100644 --- a/arch/arm/include/asm/ftrace.h +++ b/arch/arm/include/asm/ftrace.h @@ -35,26 +35,8 @@ static inline unsigned long ftrace_call_adjust(unsigned long addr) #ifndef __ASSEMBLY__ -#if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) -/* - * return_address uses walk_stackframe to do it's work. If both - * CONFIG_FRAME_POINTER=y and CONFIG_ARM_UNWIND=y walk_stackframe uses unwind - * information. For this to work in the function tracer many functions would - * have to be marked with __notrace. So for now just depend on - * !CONFIG_ARM_UNWIND. - */ - void *return_address(unsigned int); -#else - -static inline void *return_address(unsigned int level) -{ - return NULL; -} - -#endif - #define ftrace_return_address(n) return_address(n) #define ARCH_HAS_SYSCALL_MATCH_SYM_NAME |