mirror-linux/arch/powerpc/kernel/trace
Aditya Bodkhe d733f18a6d powerpc/ftrace: support CONFIG_FUNCTION_GRAPH_RETVAL
commit a1be9ccc57 ("function_graph: Support recording and printing the
return value of function") introduced support for function graph return
value tracing.

Additionally, commit a3ed4157b7 ("fgraph: Replace fgraph_ret_regs with
ftrace_regs") further refactored and optimized the implementation,
making `struct fgraph_ret_regs` unnecessary.

This patch enables the above modifications for powerpc all, ensuring that
function graph return value tracing is available on this architecture.

In this patch we have redefined two functions:
- 'ftrace_regs_get_return_value()' - the existing implementation on
ppc returns -ve of return value based on some conditions not
relevant to our patch.
- 'ftrace_regs_get_frame_pointer()' - always returns 0 in current code .

We also allocate stack space to equivalent of 'SWITCH_FRAME_SIZE',
allowing us to directly use predefined offsets like 'GPR3' and 'GPR4'
this keeps code clean and consistent with already defined offsets .

After this patch, v6.14+ kernel can also be built with FPROBE on powerpc
but there are a few other build and runtime dependencies for FPROBE to
work properly. The next patch addresses them.

Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Aditya Bodkhe <adityab1@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20250916044035.29033-1-adityab1@linux.ibm.com
2025-09-16 16:13:00 +05:30
..
Makefile powerpc/trace: Account for -fpatchable-function-entry support by toolchain 2024-10-31 11:00:52 +11:00
ftrace.c powerpc/ftrace: ensure ftrace record ops are always set for NOPs 2025-09-15 16:40:52 +05:30
ftrace_64_pg.c powerpc/ftrace: Use RCU in all users of __module_text_address(). 2025-03-10 11:54:45 +01:00
ftrace_64_pg_entry.S powerpc/ftrace: Consolidate ftrace support into fewer files 2023-08-22 00:09:05 +10:00
ftrace_entry.S powerpc/ftrace: support CONFIG_FUNCTION_GRAPH_RETVAL 2025-09-16 16:13:00 +05:30
trace_clock.c