]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
tracing/sched: sched_switch: place prev_comm and next_comm in right order
authorTio Zhang <tiozhang@didiglobal.com>
Wed, 3 Jul 2024 03:33:53 +0000 (11:33 +0800)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Mon, 15 Jul 2024 19:01:01 +0000 (15:01 -0400)
Switch the order of prev_comm and next_comm in sched_switch's code to
align with its printing order.

Cc: <mhiramat@kernel.org>
Signed-off-by: Tio Zhang <tiozhang@didiglobal.com>
Link: https://lore.kernel.org/20240703033353.GA2833@didi-ThinkCentre-M930t-N000
Reviewed-by: Madadi Vineeth Reddy <vineethr@linux.ibm.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
include/trace/events/sched.h

index 6df2b4685b08d1d6958033da55662f32b1e8c45b..9ea4c404bd4ef3efab26e0d1f135a329d21e69de 100644 (file)
@@ -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 */