mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Peng Donglin <dolinux.peng@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	mhiramat@kernel.org, dolinux.peng@gmai.com,
	linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org,
	pengdonglin <pengdonglin@xiaomi.com>
Subject: Re: [PATCH v5 0/3] Use BTF to trim return values
Date: Wed, 2 Sep 2026 23:55:33 +0900	[thread overview]
Message-ID: <20260902235533.ea387f764b51b1b2a8ce8224@kernel.org> (raw)
In-Reply-To: <f18beeb4-f3df-41eb-9990-5be295a2729b@gmail.com>

On Wed, 2 Sep 2026 11:25:29 +0800
Peng Donglin <dolinux.peng@gmail.com> wrote:

> >>    - Do not print a return value for functions with a void return type.
> >>    - Trim integer, enum, struct, and union values to the available return
> >>      value width when the BTF type provides suitable size information.
> >>    - Format integer, enum, and boolean values according to their BTF
> >>      encoding.
> >>    - Mark values as "(trunc)" when the return type is wider than the
> >>      value captured by the function graph tracer.
> > 
> > Hmm, I really don't like the "(trunc)" If it's the real return type, then
> > it should just print what the real size is. No need to state it was truncated.
> 
> Thanks, I agree. We can remove the "(trunc)" suffix and print the actual 
> type information instead, for example:
> 
>      ret=0x5[struct:0x10]
> 
> This would indicate that the return type is a struct with a size of 0x10 
> bytes.

Hmm, shouldn't both the actually applied size and the true size be displayed?
e.g.

ret=0x5 (in 8 bytes, true size: 16 bytes)

Thank you,

> 
> Would this be acceptable?
> 
> > 

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

  reply	other threads:[~2026-09-02 14:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01 13:46 Donglin Peng
2026-09-01 13:46 ` [PATCH v5 1/3] ftrace: Build trace_btf.c when CONFIG_DEBUG_INFO_BTF is enabled Donglin Peng
2026-09-02 14:58   ` Masami Hiramatsu
2026-09-01 13:46 ` [PATCH v5 2/3] fgraph: Enhance funcgraph-retval with BTF-based type-aware output Donglin Peng
2026-09-01 13:46 ` [PATCH v5 3/3] tracing: Update funcgraph-retval documentation Donglin Peng
2026-09-01 17:57 ` [PATCH v5 0/3] Use BTF to trim return values Steven Rostedt
2026-09-02  3:25   ` Peng Donglin
2026-09-02 14:55     ` Masami Hiramatsu [this message]
2026-09-03 16:17       ` Donglin Peng
2026-09-03 16:36       ` Steven Rostedt
2026-09-03 23:48         ` Masami Hiramatsu
2026-09-04  0:30           ` Steven Rostedt
2026-09-04  1:34             ` Donglin Peng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260902235533.ea387f764b51b1b2a8ce8224@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=dolinux.peng@gmai.com \
    --cc=dolinux.peng@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=pengdonglin@xiaomi.com \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®