Conversation

Richard Weinberger

Edited 8 days ago
  • 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.

2
8
14

@rw it's really sad when you try to be cool and it fails miserably :(

0
0
0

@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 😁

1
0
0
@agraf The code exists, but it never made it upstream. Let's see whether I can find some cycles this weekend to redo the change for the latest version and resubmit.
https://lore.kernel.org/all/c61eb9290c3e817d4d70c429c0e987e3ec51a3c4.1680954589.git.pengdonglin@sangfor.com.cn/
1
2
4
@agraf as usual, after committing, you notice a stupid typo in the code 😅😅😅
0
0
0