Step 1: While debugging a kernel issue, you want the return value of a function at startup.
Step 2: Instead of just adding a printk()
and recompiling, you try tracing like the cool kids.
Step 3: Since 2023, the function graph tracer can show return values. You add to the kernel command line and reboot: ftrace=function_graph ftrace_filter=interesting_fn trace_options=funcgraph-retval
Step 4: The trace shows no return value. You find that ARM return value capture exists only for AArch64, not ARM32.
Step 5: You add a printk()
and rebuild.
@rw it's really sad when you try to be cool and it fails miserably :(
@rw This could have been an even more amazing story where you charge your customer for 3 months of kernel dev work to implement the ARM32 ftrace return value functionality 😁