Re: [PATCH v3 RESEND] function_graph: Enable funcgraph-args and funcgraph-retaddr to work simultaneously
From: Steven Rostedt
Date: Wed Nov 12 2025 - 10:37:59 EST
On Wed, 12 Nov 2025 17:00:10 +0800
Donglin Peng <dolinux.peng@xxxxxxxxx> wrote:
> I have a question regarding the behavior of the funcgraph-args option.
>
> Currently, when the funcgraph-args flag is set, the function arguments
> are saved.
> However, when the flag is cleared, the trace output still displays the function
> arguments unconditionally.
Yes. The flag affects the behavior of the recording and not the displaying
of the arguments. There's no reason *not* to show them if they have already
been recorded. Recording the arguments causes a noticeable overhead which
is why it is optional.
>
> I expected that the flag would control both saving and displaying the arguments.
> But it seems that the current design only controls the saving. This
> behavior seems
> inconsistent.
Not at all. The option is only for the recording. Otherwise, one might
expect than they could do the recording and then after the fact enable
"func-args" and expect to see them. That would be more inconsistent.
>
> I think we should add a check for the flag in the display part,
> specifically before
> calling print_function_args, to ensure that the arguments are only
> displayed when
> the flag is set.
>
> What are your thoughts?
Big nope!
The retaddr is different, as the information is somewhat redundant to the
call chain and may cause more noise then needed.
-- Steve