From: Steven Rostedt <rostedt@goodmis.org>
To: "Bang Li" <libang.li@antgroup.com>
Cc: mhiramat@kernel.org, <mark.rutland@arm.com>,
<mathieu.desnoyers@efficios.com>,
<linux-trace-kernel@vger.kernel.org>, <libang.linux@gmail.com>
Subject: Re: [PATCH] ftrace: Replace ftrace_disabled variable with ftrace_is_dead function
Date: Fri, 19 Apr 2024 21:40:54 -0400 [thread overview]
Message-ID: <20240419214054.688d624e@rorschach.local.home> (raw)
In-Reply-To: <20240419143844.97847-1-libang.li@antgroup.com>
On Fri, 19 Apr 2024 22:38:44 +0800
"Bang Li" <libang.li@antgroup.com> wrote:
> Use the existing function ftrace_is_dead to replace the variable to make
> the code clearer.
>
> Signed-off-by: Bang Li <libang.li@antgroup.com>
> ---
> kernel/trace/ftrace.c | 46 +++++++++++++++++++++----------------------
> 1 file changed, 23 insertions(+), 23 deletions(-)
>
> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index 50ca4d4f8840..4a08c79db677 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -2693,7 +2693,7 @@ void __weak ftrace_replace_code(int mod_flags)
> int schedulable = mod_flags & FTRACE_MODIFY_MAY_SLEEP_FL;
> int failed;
>
> - if (unlikely(ftrace_disabled))
> + if (unlikely(ftrace_is_dead()))
> return;
>
NACK!
ftrace_is_dead() is only there to make the static variable
"ftrace_disabled" available for code outside of ftrace.c. In ftrace.c,
it is perfectly fine to use ftrace_disabled.
-- Steve
next prev parent reply other threads:[~2024-04-20 1:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-19 14:38 [PATCH] ftrace: Replace ftrace_disabled variable with ftrace_is_dead function Bang Li
2024-04-20 1:40 ` Steven Rostedt [this message]
2024-04-20 3:50 ` Bang Li
2024-04-28 4:17 ` 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=20240419214054.688d624e@rorschach.local.home \
--to=rostedt@goodmis.org \
--cc=libang.li@antgroup.com \
--cc=libang.linux@gmail.com \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.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