From: Steven Rostedt <rostedt@goodmis.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Colin Ian King <colin.i.king@gmail.com>,
Jeff Xie <jeff.xie@linux.dev>,
Jinjie Ruan <ruanjinjie@huawei.com>,
Josh Poimboeuf <jpoimboe@kernel.org>,
Justin Stitt <justinstitt@google.com>,
Levi Yun <yeoreum.yun@arm.com>,
Li Chen <chenl311@chinatelecom.cn>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Ryan Roberts <ryan.roberts@arm.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Tatsuya S <tatsuya.s2862@gmail.com>,
Uros Bizjak <ubizjak@gmail.com>,
Zheng Yejian <zhengyejian@huaweicloud.com>,
guoweikang <guoweikang.kernel@gmail.com>
Subject: Re: [GIT PULL] tracing: Updates for v6.13
Date: Fri, 22 Nov 2024 17:13:23 -0500 [thread overview]
Message-ID: <20241122171323.1dd0efc9@gandalf.local.home> (raw)
In-Reply-To: <CAHk-=witPrLcu22dZ93VCyRQonS7+-dFYhQbna=KBa-TAhayMw@mail.gmail.com>
On Fri, 22 Nov 2024 13:54:49 -0800
Linus Torvalds <torvalds@linux-foundation.org> wrote:
> And yes, it's a static conditional, but it's *STUPID*. And it makes
> the code just harder to follow, for no good reason. The difference is
> literally this magic
>
> __DO_TRACE(name, \
> TP_ARGS(args), \
> TP_CONDITION(cond), 0); \
>
> vs
>
> __DO_TRACE(name, \
> TP_ARGS(args), \
> TP_CONDITION(cond), 1); \
Hmm, if we make a __DO_TRACE_SYSCALL(), I don't think it needs to even have
that condition parameter. The TP_CONDITION() is to allow tracepoints to
check a condition within the static_branch() portion of the tracepoint so
the condition does not get called when tracepoints are disabled (and just a
nop). By default we have:
#define DECLARE_TRACE_SYSCALL(name, proto, args) \
__DECLARE_TRACE_SYSCALL(name, PARAMS(proto), PARAMS(args), \
cpu_online(raw_smp_processor_id()), \
PARAMS(void *__data, proto))
Where the tracepoint has to at least be called when the current CPU is
online. But is there every a case where a CPU is not online when a system
call is entered or exited?
And there isn't any use cases of calling the system call tracepoint with a
condition. Hence, I think the __DO_TRACE_SYSCALL() doesn't even need to
include the condition:
#define __DO_TRACE_SYSCALL(name, args) \
do { \
int __maybe_unused __idx = 0; \
Oh, also the __idx isn't used since I removed the SRCU, so we can remove
that too. Maybe make that a separate patch?
rcu_read_lock_trace(); \
\
__DO_TRACE_CALL(name, TP_ARGS(args)); \
\
rcu_read_unlock_trace(); \
} while (0)
-- Steve
next prev parent reply other threads:[~2024-11-22 22:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-21 2:45 Steven Rostedt
2024-11-22 21:54 ` Linus Torvalds
2024-11-22 22:00 ` Steven Rostedt
2024-11-22 22:13 ` Mathieu Desnoyers
2024-11-22 22:13 ` Steven Rostedt [this message]
2024-11-22 22:30 ` Linus Torvalds
2024-11-22 22:41 ` Steven Rostedt
2024-11-22 22:32 ` pr-tracker-bot
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=20241122171323.1dd0efc9@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=andrii@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=chenl311@chinatelecom.cn \
--cc=colin.i.king@gmail.com \
--cc=guoweikang.kernel@gmail.com \
--cc=jeff.xie@linux.dev \
--cc=jpoimboe@kernel.org \
--cc=justinstitt@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=ruanjinjie@huawei.com \
--cc=ryan.roberts@arm.com \
--cc=tatsuya.s2862@gmail.com \
--cc=torvalds@linux-foundation.org \
--cc=ubizjak@gmail.com \
--cc=yeoreum.yun@arm.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
all inboxes | Powered by JetHome®