From: Steven Rostedt <rostedt@goodmis.org>
To: Donglin Peng <dolinux.peng@gmail.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org,
Donglin Peng <pengdonglin@xiaomi.com>,
Sven Schnelle <svens@linux.ibm.com>
Subject: Re: [PATCH v3 RESEND] function_graph: Enable funcgraph-args and funcgraph-retaddr to work simultaneously
Date: Wed, 12 Nov 2025 21:02:36 -0500 [thread overview]
Message-ID: <20251112210236.07deb6b2@gandalf.local.home> (raw)
In-Reply-To: <CAErzpmt8Dsq3f6ZUvtmc25hvy0NH6uRxBHPSxeZhkFfzkdJ04g@mail.gmail.com>
On Thu, 13 Nov 2025 09:48:52 +0800
Donglin Peng <dolinux.peng@gmail.com> wrote:
> I noticed that when funcgraph-args is enabled, it registers
> trace_graph_entry_args
> to replace trace_graph_entry. The only difference is whether a valid
> fregs pointer
> is passed.
>
> To reduce overhead, I propose consolidating the two entry functions. We could
> maintain only trace_graph_entry and pass the fregs parameter to graph_entry.
> Within __graph_entry, we can then conditionally record arguments based on
> 'TRACE_GRAPH_ARGS && !!fregs'.
What overhead are you reducing? Why add a branch statement in a critical path?
The graph_entry() should not be looking at the flags argument. It's called
by *every function*. Also note, I recently fixed the flags to be per
instance and not global. Which means testing the flags would require
indirection lookups.
-- Steve
next prev parent reply other threads:[~2025-11-13 2:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-12 3:43 Donglin Peng
2025-11-12 5:17 ` Masami Hiramatsu
2025-11-12 6:03 ` Donglin Peng
2025-11-12 7:10 ` Masami Hiramatsu
2025-11-12 7:22 ` Donglin Peng
2025-11-12 15:30 ` Steven Rostedt
2025-11-12 6:36 ` Donglin Peng
2025-11-12 9:00 ` Donglin Peng
2025-11-12 15:38 ` Steven Rostedt
2025-11-13 1:48 ` Donglin Peng
2025-11-13 2:02 ` Steven Rostedt [this message]
2025-11-13 2:38 ` Donglin Peng
2025-11-13 3:01 ` Donglin Peng
2025-11-13 3:21 ` Steven Rostedt
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=20251112210236.07deb6b2@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=dolinux.peng@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=pengdonglin@xiaomi.com \
--cc=svens@linux.ibm.com \
/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®