Skip to content

Commit a325742

Browse files
Tio Zhangrostedt
authored andcommitted
tracing/sched: sched_switch: place prev_comm and next_comm in right order
Switch the order of prev_comm and next_comm in sched_switch's code to align with its printing order. Cc: <[email protected]> Signed-off-by: Tio Zhang <[email protected]> Link: https://lore.kernel.org/20240703033353.GA2833@didi-ThinkCentre-M930t-N000 Reviewed-by: Madadi Vineeth Reddy <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent c40583e commit a325742

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/trace/events/sched.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,11 @@ TRACE_EVENT(sched_switch,
239239
),
240240

241241
TP_fast_assign(
242-
memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN);
242+
memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN);
243243
__entry->prev_pid = prev->pid;
244244
__entry->prev_prio = prev->prio;
245245
__entry->prev_state = __trace_sched_switch_state(preempt, prev_state, prev);
246-
memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN);
246+
memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN);
247247
__entry->next_pid = next->pid;
248248
__entry->next_prio = next->prio;
249249
/* XXX SCHED_DEADLINE */

0 commit comments

Comments
 (0)