From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
Masami Hiramatsu <mhiramat@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/2] tracing: Exit out immediately after update_marker_trace()
Date: Mon, 10 Nov 2025 14:24:45 +0900 [thread overview]
Message-ID: <20251110142445.db72eb74a64f01cdc6689f43@kernel.org> (raw)
In-Reply-To: <20251106003501.726406870@kernel.org>
On Wed, 05 Nov 2025 19:33:25 -0500
Steven Rostedt <rostedt@kernel.org> wrote:
> From: Steven Rostedt <rostedt@goodmis.org>
>
> The call to update_marker_trace() in set_tracer_flag() performs the update
> to the tr->trace_flags. There's no reason to perform it again after it is
> called. Return immediately instead.
>
Looks good to me.
Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Thanks,
> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
> ---
> kernel/trace/trace.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index dea1566b3301..07bd10808277 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -5285,8 +5285,11 @@ int set_tracer_flag(struct trace_array *tr, u64 mask, int enabled)
> }
> }
>
> - if (mask == TRACE_ITER(COPY_MARKER))
> + if (mask == TRACE_ITER(COPY_MARKER)) {
> update_marker_trace(tr, enabled);
> + /* update_marker_trace updates the tr->trace_flags */
> + return 0;
> + }
>
> if (enabled)
> tr->trace_flags |= mask;
> --
> 2.51.0
>
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
next prev parent reply other threads:[~2025-11-10 5:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-06 0:33 [PATCH 0/2] tracing: Clean up of set_tracer_flag() Steven Rostedt
2025-11-06 0:33 ` [PATCH 1/2] tracing: Exit out immediately after update_marker_trace() Steven Rostedt
2025-11-10 5:24 ` Masami Hiramatsu [this message]
2025-11-06 0:33 ` [PATCH 2/2] tracing: Use switch statement instead of ifs in set_tracer_flag() Steven Rostedt
2025-11-10 5:48 ` Masami Hiramatsu
2025-11-10 16:42 ` 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=20251110142445.db72eb74a64f01cdc6689f43@kernel.org \
--to=mhiramat@kernel.org \
--cc=akpm@linux-foundation.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=rostedt@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;
as well as URLs for NNTP newsgroup(s).