Linux Trace Kernel
 help / color / mirror / Atom feed
From: Tio Zhang <tiozhang@didiglobal.com>
To: <rostedt@goodmis.org>, <mhiramat@kernel.org>
Cc: <linux-kernel@vger.kernel.org>,
	<linux-trace-kernel@vger.kernel.org>, <vineethr@linux.ibm.com>,
	<akpm@linux-foundation.org>, <mathieu.desnoyers@efficios.com>,
	<tiozhang@didiglobal.com>, <mingo@kernel.org>,
	<mgorman@techsingularity.net>, <peterz@infradead.org>,
	<qyousef@layalina.io>, <vincent.guittot@linaro.org>,
	<elver@google.com>, <zyhtheonly@gmail.com>, <zyhtheonly@yeah.net>
Subject: [PATCH 1/1] tracing/sched: sched_switch: place prev_comm and next_comm in right order
Date: Wed, 3 Jul 2024 11:33:53 +0800	[thread overview]
Message-ID: <20240703033353.GA2833@didi-ThinkCentre-M930t-N000> (raw)

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>
Reviewed-by: Madadi Vineeth Reddy <vineethr@linux.ibm.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 */
-- 
2.17.1


             reply	other threads:[~2024-07-03  3:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-03  3:33 Tio Zhang [this message]
2024-07-15 19:04 ` [PATCH 1/1] tracing/sched: sched_switch: place prev_comm and next_comm in right order 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=20240703033353.GA2833@didi-ThinkCentre-M930t-N000 \
    --to=tiozhang@didiglobal.com \
    --cc=akpm@linux-foundation.org \
    --cc=elver@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mgorman@techsingularity.net \
    --cc=mhiramat@kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=qyousef@layalina.io \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vineethr@linux.ibm.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