[PATCH v5 1/2] function_graph: Support recording and printing the return value of function

Steven Rostedt rostedt at goodmis.org
Tue Mar 21 07:44:13 PDT 2023


On Tue, 21 Mar 2023 15:09:40 +0100
Florian Kauer <florian.kauer at linutronix.de> wrote:

> On 20.03.23 14:16, Donglin Peng wrote:
> > When using the function_graph tracer to analyze system call failures,
> > it can be time-consuming to analyze the trace logs and locate the kernel
> > function that first returns an error. This change aims to simplify the
> > process by recording the function return value to the 'retval' member of
> > 'ftrace_graph_ent' and printing it when outputing the trace log.  
> 
> I just came across your patch by pure luck and it helped me a lot
> to trace down a problem I had, thanks!
> 
> So you can have my
> Tested-by: Florian Kauer <florian.kauer at linutronix.de>
>  
> > New trace options are introduced: funcgraph-retval and graph_retval_hex.  
> 
> I would personally prefer to have the second option scoped better, so for example
> "funcgraph-retval-hex".

That could be an ftrace option.

Anyway, could you tell us your use case, and that could go into the change
log of this patch as "one use case that this helped with".

Thanks,

-- Steve




More information about the linux-arm-kernel mailing list