tracing/sched: sched_switch: place prev_comm and next_comm in right order
PATCH 1/1 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.
--- include/trace/events/sched.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/trace/events/sched.h +2 -2
@@ -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 */
Signature · 1 line
2.17.1
Steven Rostedt
maintainer[ Adding sched maintainers, as this is a scheduling trace event ]
Quoted 2 lines · On Wed, 3 Jul 2024 11:33:53 +0800 Tio Zhang <[email protected]> wrote:
Switch the order of
prev_commandnext_commin sched_switch's code to align with its printing order.
I'm going to pick this up in my tree, as it is pretty much a nop. It's just changing the ordering of the assignments of the comm names so that the copy of prev_comm is with the updates to the prev_fields, and the next_comm is with the updates to the next fields.
-- Steve
Quoted 25 lines
Signed-off-by Tio Zhang <[email protected]>Reviewed-by Madadi Vineeth Reddy <[email protected]>--- include/trace/events/sched.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)include/trace/events/sched.h +2
-2@@ -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 */
Quoted 6 lines · Steven Rostedt
[ Adding sched maintainers, as this is a scheduling trace event ]
On Wed, 3 Jul 2024 11:33:53 +0800
Tio Zhang <[email protected]> wrote:
Quoted 7 lines
Quoted 2 lines
Switch the order of
prev_commandnext_commin sched_switch's code to align with its printing order.I'm going to pick this up in my tree, as it is pretty much a nop. It's just changing the ordering of the assignments of the comm names so that the copy of
prev_commis with the updates to theprev_fields, and thenext_commis with the updates to the next fields.
Right, have at. very close to a whitespace patch.