From: Steven Rostedt <rostedt@goodmis.org>
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
Mark Rutland <mark.rutland@arm.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Andrew Morton <akpm@linux-foundation.org>,
Sven Schnelle <svens@linux.ibm.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>, Guo Ren <guoren@kernel.org>,
Donglin Peng <dolinux.peng@gmail.com>,
Zheng Yejian <zhengyejian@huaweicloud.com>,
bpf@vger.kernel.org
Subject: Re: [PATCH v3 2/4] ftrace: Add support for function argument to graph tracer
Date: Wed, 26 Feb 2025 11:11:56 -0500 [thread overview]
Message-ID: <20250226111156.3e9bb653@gandalf.local.home> (raw)
In-Reply-To: <20250226234852.5b6d2c34ef02d3e9a4b80d4e@kernel.org>
On Wed, 26 Feb 2025 23:48:52 +0900
Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:
> > - event = trace_buffer_lock_reserve(buffer, TRACE_GRAPH_ENT,
> > - sizeof(*entry), trace_ctx);
> > + /* If fregs is defined, add FTRACE_REGS_MAX_ARGS long size words */
> > + size = sizeof(*entry) + (FTRACE_REGS_MAX_ARGS * !!fregs * sizeof(long));
>
> Is `!!fregs` always 1 if fregs != NULL? (seems to depend on compiler)
Yes, C guarantees that ! is either 1 or zero. If you want to convert
something from non zero to 1, the C convention is "!!".
>
> Others looks good to me.
>
> Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Thanks!
-- Steve
next prev parent reply other threads:[~2025-02-26 16:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-25 22:26 [PATCH v3 0/4] ftrace: Add function arguments to function tracers Steven Rostedt
2025-02-25 22:26 ` [PATCH v3 1/4] ftrace: Add print_function_args() Steven Rostedt
2025-02-26 14:48 ` Masami Hiramatsu
2025-02-25 22:26 ` [PATCH v3 2/4] ftrace: Add support for function argument to graph tracer Steven Rostedt
2025-02-26 14:48 ` Masami Hiramatsu
2025-02-26 16:11 ` Steven Rostedt [this message]
2025-02-25 22:26 ` [PATCH v3 3/4] ftrace: Have funcgraph-args take affect during tracing Steven Rostedt
2025-02-25 22:26 ` [PATCH v3 4/4] ftrace: Add arguments to function tracer 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=20250226111156.3e9bb653@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=aou@eecs.berkeley.edu \
--cc=bpf@vger.kernel.org \
--cc=dolinux.peng@gmail.com \
--cc=guoren@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=svens@linux.ibm.com \
--cc=zhengyejian@huaweicloud.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