Linux Trace Kernel
 help / color / mirror / Atom feed
* [PATCH v1 0/2] Use BTF to trim return values
@ 2025-12-07 14:27 Donglin Peng
  2025-12-07 14:27 ` [PATCH v1 1/2] fgraph: use BTF to trim and filter " Donglin Peng
  2025-12-07 14:27 ` [PATCH v1 2/2] tracing: Update funcgraph-retval documentation Donglin Peng
  0 siblings, 2 replies; 3+ messages in thread
From: Donglin Peng @ 2025-12-07 14:27 UTC (permalink / raw)
  To: rostedt; +Cc: linux-trace-kernel, linux-kernel, pengdonglin

From: pengdonglin <pengdonglin@xiaomi.com>

The current funcgraph-retval implementation has two limitations:

1. It prints a return value even when the traced function returns void.
2. When the return type is narrower than a register, the printed value may
   be incorrect because high bits can contain undefined data.

Both issues are addressed by using BTF to obtain the precise return type
of each traced function:

- Return values are now printed only for functions whose return type is
  not void.
- The value is truncated to the actual width of the return type, ensuring
  correct representation.

These changes make the funcgraph-retval output more accurate and remove
noise from void functions.

pengdonglin (2):
  fgraph: use BTF to trim and filter return values
  tracing: Update funcgraph-retval documentation

 Documentation/trace/ftrace.rst       | 74 +++++++++++++++-------------
 kernel/trace/trace_functions_graph.c | 64 ++++++++++++++++++++----
 2 files changed, 94 insertions(+), 44 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2025-12-07 14:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-07 14:27 [PATCH v1 0/2] Use BTF to trim return values Donglin Peng
2025-12-07 14:27 ` [PATCH v1 1/2] fgraph: use BTF to trim and filter " Donglin Peng
2025-12-07 14:27 ` [PATCH v1 2/2] tracing: Update funcgraph-retval documentation Donglin Peng

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