diff options
author | Sven Schnelle <svens@linux.ibm.com> | 2023-06-29 12:02:19 +0200 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2023-07-24 12:12:22 +0200 |
commit | 1256e70a082ad855efe351146dfa39207d5e3e70 (patch) | |
tree | a69c5b676f9373fbf896ba4826e165bdc9d99448 /arch/s390/include | |
parent | s390/hypfs: factor out filesystem code (diff) | |
download | linux-1256e70a082ad855efe351146dfa39207d5e3e70.tar.gz linux-1256e70a082ad855efe351146dfa39207d5e3e70.tar.bz2 linux-1256e70a082ad855efe351146dfa39207d5e3e70.zip |
s390/ftrace: enable HAVE_FUNCTION_GRAPH_RETVAL
Add support for tracing return values in the function graph tracer.
This requires return_to_handler() to record gpr2 and the frame pointer
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/include')
-rw-r--r-- | arch/s390/include/asm/ftrace.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/s390/include/asm/ftrace.h b/arch/s390/include/asm/ftrace.h index e5c5cb1207e2..5a82b08f03cd 100644 --- a/arch/s390/include/asm/ftrace.h +++ b/arch/s390/include/asm/ftrace.h @@ -54,6 +54,23 @@ static __always_inline struct pt_regs *arch_ftrace_get_regs(struct ftrace_regs * return NULL; } +#ifdef CONFIG_FUNCTION_GRAPH_TRACER +struct fgraph_ret_regs { + unsigned long gpr2; + unsigned long fp; +}; + +static __always_inline unsigned long fgraph_ret_regs_return_value(struct fgraph_ret_regs *ret_regs) +{ + return ret_regs->gpr2; +} + +static __always_inline unsigned long fgraph_ret_regs_frame_pointer(struct fgraph_ret_regs *ret_regs) +{ + return ret_regs->fp; +} +#endif /* CONFIG_FUNCTION_GRAPH_TRACER */ + static __always_inline unsigned long ftrace_regs_get_instruction_pointer(const struct ftrace_regs *fregs) { |