From: Steven Rostedt <rostedt@goodmis.org>
To: Donglin Peng <dolinux.peng@gmail.com>
Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org,
Sven Schnelle <svens@linux.ibm.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
Donglin Peng <pengdonglin@xiaomi.com>
Subject: Re: [PATCH v2] function_graph: Enable funcgraph-args and funcgraph-retaddr to work simultaneously
Date: Tue, 11 Nov 2025 18:37:03 -0500 [thread overview]
Message-ID: <20251111183703.0045ca23@gandalf.local.home> (raw)
In-Reply-To: <20251111135432.2143993-1-dolinux.peng@gmail.com>
On Tue, 11 Nov 2025 21:54:32 +0800
Donglin Peng <dolinux.peng@gmail.com> wrote:
> + /* Store the retaddr in args[0] */
> + if (type == TRACE_GRAPH_RETADDR_ENT)
> + entry->args[i++] = retaddr;
> +
> #ifdef CONFIG_HAVE_FUNCTION_ARG_ACCESS_API
> - if (fregs) {
> - for (int i = 0; i < FTRACE_REGS_MAX_ARGS; i++)
> - entry->args[i] = ftrace_regs_get_argument(fregs, i);
> + if (store_args) {
> + while (i < nr_args) {
Nit, this could stay as a for loop. You just don't initialize the 'i':
for (; i < nr_args; i++) {
> + entry->args[i] = ftrace_regs_get_argument(fregs,
> + i - (type == TRACE_GRAPH_RETADDR_ENT ? 1 : 0));
> + i++;
Then you don't need the "i++" here.
-- Steve
> + }
> }
next prev parent reply other threads:[~2025-11-11 23:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-11 13:54 [PATCH v2] function_graph: Enable funcgraph-args and funcgraph-retaddr to work simultaneously Donglin Peng
2025-11-11 23:28 ` Steven Rostedt
2025-11-12 1:46 ` Donglin Peng
2025-11-11 23:37 ` Steven Rostedt [this message]
2025-11-12 1:47 ` 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=20251111183703.0045ca23@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