public inbox for linux-trace-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] function_graph: Fix missing FGRAPH_ENTRY_ARGS() call in print_graph_retval()
@ 2026-01-11 14:33 Donglin Peng
  2026-01-13  0:48 ` Masami Hiramatsu
  0 siblings, 1 reply; 2+ messages in thread
From: Donglin Peng @ 2026-01-11 14:33 UTC (permalink / raw)
  To: rostedt; +Cc: mhiramat, linux-trace-kernel, linux-kernel, Donglin Peng

From: Donglin Peng <pengdonglin@xiaomi.com>

Call FGRAPH_ENTRY_ARGS(entry) to retrieve the correct arguments pointer
when displaying function parameters in print_graph_retval().

Fixes: f83ac7544fbf ("function_graph: Enable funcgraph-args and funcgraph-retaddr to work simultaneously")
Signed-off-by: Donglin Peng <pengdonglin@xiaomi.com>
---
 kernel/trace/trace_functions_graph.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
index b1e9c9913309..1de6f1573621 100644
--- a/kernel/trace/trace_functions_graph.c
+++ b/kernel/trace/trace_functions_graph.c
@@ -901,7 +901,7 @@ static void print_graph_retval(struct trace_seq *s, struct ftrace_graph_ent_entr
 		trace_seq_printf(s, "%ps", func);
 
 		if (args_size >= FTRACE_REGS_MAX_ARGS * sizeof(long)) {
-			print_function_args(s, entry->args, (unsigned long)func);
+			print_function_args(s, FGRAPH_ENTRY_ARGS(entry), (unsigned long)func);
 			trace_seq_putc(s, ';');
 		} else
 			trace_seq_puts(s, "();");
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] function_graph: Fix missing FGRAPH_ENTRY_ARGS() call in print_graph_retval()
  2026-01-11 14:33 [PATCH] function_graph: Fix missing FGRAPH_ENTRY_ARGS() call in print_graph_retval() Donglin Peng
@ 2026-01-13  0:48 ` Masami Hiramatsu
  0 siblings, 0 replies; 2+ messages in thread
From: Masami Hiramatsu @ 2026-01-13  0:48 UTC (permalink / raw)
  To: Donglin Peng
  Cc: rostedt, mhiramat, linux-trace-kernel, linux-kernel, Donglin Peng

On Sun, 11 Jan 2026 22:33:18 +0800
Donglin Peng <dolinux.peng@gmail.com> wrote:

> From: Donglin Peng <pengdonglin@xiaomi.com>
> 
> Call FGRAPH_ENTRY_ARGS(entry) to retrieve the correct arguments pointer
> when displaying function parameters in print_graph_retval().
> 
> Fixes: f83ac7544fbf ("function_graph: Enable funcgraph-args and funcgraph-retaddr to work simultaneously")
> Signed-off-by: Donglin Peng <pengdonglin@xiaomi.com>

Looks good to me. (other print_function_args() using this macro)

Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>

Thanks!

> ---
>  kernel/trace/trace_functions_graph.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
> index b1e9c9913309..1de6f1573621 100644
> --- a/kernel/trace/trace_functions_graph.c
> +++ b/kernel/trace/trace_functions_graph.c
> @@ -901,7 +901,7 @@ static void print_graph_retval(struct trace_seq *s, struct ftrace_graph_ent_entr
>  		trace_seq_printf(s, "%ps", func);
>  
>  		if (args_size >= FTRACE_REGS_MAX_ARGS * sizeof(long)) {
> -			print_function_args(s, entry->args, (unsigned long)func);
> +			print_function_args(s, FGRAPH_ENTRY_ARGS(entry), (unsigned long)func);
>  			trace_seq_putc(s, ';');
>  		} else
>  			trace_seq_puts(s, "();");
> -- 
> 2.34.1
> 


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-01-13  0:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-11 14:33 [PATCH] function_graph: Fix missing FGRAPH_ENTRY_ARGS() call in print_graph_retval() Donglin Peng
2026-01-13  0:48 ` Masami Hiramatsu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox