From: Madadi Vineeth Reddy <vineethr@linux.ibm.com>
To: tiozhang@didiglobal.com
Cc: Steven Rostedt <rostedt@goodmis.org>,
mhiramat@kernel.org, akpm@linux-foundation.org,
linux-kernel@vger.kernel.org,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
zyhtheonly@gmail.com, zyhtheonly@yeah.net,
Madadi Vineeth Reddy <vineethr@linux.ibm.com>
Subject: Re: [PATCH 1/1] tracing/sched: sched_switch: place prev_comm and next_comm in right order
Date: Tue, 23 Apr 2024 15:54:08 +0530 [thread overview]
Message-ID: <14898c69-6a2e-4a9d-a0d4-d674087cd1ae@linux.ibm.com> (raw)
In-Reply-To: <20240417102840.GA6614@didi-ThinkCentre-M930t-N000>
Hi Tio zhang,
On 17/04/24 15:59, Tio Zhang wrote:
> Switch the order of prev_comm and next_comm in sched_switch's code to
> align with its printing order.
>
> Signed-off-by: Tio Zhang <tiozhang@didiglobal.com>
> ---
> include/trace/events/sched.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
> index dbb01b4b7451..a4bd4330db4c 100644
> --- a/include/trace/events/sched.h
> +++ b/include/trace/events/sched.h
> @@ -239,11 +239,11 @@ TRACE_EVENT(sched_switch,
> ),
>
> TP_fast_assign(
> - memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN);
> + memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN);
> __entry->prev_pid = prev->pid;
> __entry->prev_prio = prev->prio;
> __entry->prev_state = __trace_sched_switch_state(preempt, prev_state, prev);
> - memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN);
> + memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN);
> __entry->next_pid = next->pid;
> __entry->next_prio = next->prio;
> /* XXX SCHED_DEADLINE */
Yes, makes sense to have all previous and then the next for increased readability.
Reviewed-by: Madadi Vineeth Reddy <vineethr@linux.ibm.com>
next prev parent reply other threads:[~2024-04-23 10:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-17 10:29 [PATCH 1/1] tracing/sched: sched_switch: place prev_comm and next_comm in right order Tio Zhang
2024-04-23 10:24 ` Madadi Vineeth Reddy [this message]
2024-07-02 7:14 ` 张元瀚 Tio Zhang
2024-07-02 16:29 ` Steven Rostedt
2024-07-12 7:18 ` 张元瀚 Tio Zhang
-- strict thread matches above, loose matches on Subject: below --
2024-07-03 3:33 Tio Zhang
2024-07-15 19:04 ` Steven Rostedt
2024-07-16 9:18 ` Peter Zijlstra
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=14898c69-6a2e-4a9d-a0d4-d674087cd1ae@linux.ibm.com \
--to=vineethr@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
--cc=tiozhang@didiglobal.com \
--cc=zyhtheonly@gmail.com \
--cc=zyhtheonly@yeah.net \
/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