#1106120 linux-image-6.12.19-amd64: CONFIG_FUNCTION_GRAPH_RETVAL is not set

#1106120#5
Date:
2025-05-19 20:12:28 UTC
From:
To:
Dear Maintainer,

Since kernel 6.4, the ftrace subsystem has had a "superpower" feature called funcgraph-retval:
To the existing function graph tracer, it adds the return values. This is a lifesaver in
complex investigations, as it allows to instantly see the whole chain of "error returns"
from deep inside an offending call. Without it, doing the same requires painstakingly enabling
kretprobes on many functions, which obviously adds a huge amount of noise, as these probes will
also fire outside of the graph of interest. It literally means _days_ instead of mere minutes !

Problem is, the feature is controlled by CONFIG_FUNCTION_GRAPH_RETVAL, which is *not*
enabled on Debian kernels. Sure enough, it incurs a slight overhead, but please note:

 - the CPU overhead is only present if runtime-activated (echo 1 > options/funcgraph-retval)
 - the memory overhead is always present, but only on the function-graph tracer, which is heavyweigth anyway
 - it has absolutely no effect outside of ftrace of course

Ftrace is already a Swiss Army Knife, in that it is available on all Debian production kernels (thanks for that !)
So, it would seem natural to follow its evolution, and integrate such a killer new feature.
This is low hanging fruit to save precious hours to whoever wants to dig into the kernel,
or even just troubleshoot some misconfigured sysctl. This ends up avoiding reports to the Debian BTS :)

What do you think ? Would you consider adding this to the production config ?

     CONFIG_FUNCTION_GRAPH_RETVAL=y

Thanks in advance,