aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events
diff options
context:
space:
mode:
Diffstat (limited to 'include/trace/events')
-rw-r--r--include/trace/events/sched.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
index dd4033cf5b09..24ab5bcff7b2 100644
--- a/include/trace/events/sched.h
+++ b/include/trace/events/sched.h
@@ -156,6 +156,7 @@ TRACE_EVENT(sched_switch,
156 __array( char, prev_comm, TASK_COMM_LEN ) 156 __array( char, prev_comm, TASK_COMM_LEN )
157 __field( pid_t, prev_pid ) 157 __field( pid_t, prev_pid )
158 __field( int, prev_prio ) 158 __field( int, prev_prio )
159 __field( long, prev_state )
159 __array( char, next_comm, TASK_COMM_LEN ) 160 __array( char, next_comm, TASK_COMM_LEN )
160 __field( pid_t, next_pid ) 161 __field( pid_t, next_pid )
161 __field( int, next_prio ) 162 __field( int, next_prio )
@@ -165,13 +166,19 @@ TRACE_EVENT(sched_switch,
165 memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN); 166 memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN);
166 __entry->prev_pid = prev->pid; 167 __entry->prev_pid = prev->pid;
167 __entry->prev_prio = prev->prio; 168 __entry->prev_prio = prev->prio;
169 __entry->prev_state = prev->state;
168 memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN); 170 memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN);
169 __entry->next_pid = next->pid; 171 __entry->next_pid = next->pid;
170 __entry->next_prio = next->prio; 172 __entry->next_prio = next->prio;
171 ), 173 ),
172 174
173 TP_printk("task %s:%d [%d] ==> %s:%d [%d]", 175 TP_printk("task %s:%d [%d] (%s) ==> %s:%d [%d]",
174 __entry->prev_comm, __entry->prev_pid, __entry->prev_prio, 176 __entry->prev_comm, __entry->prev_pid, __entry->prev_prio,
177 __entry->prev_state ?
178 __print_flags(__entry->prev_state, "|",
179 { 1, "S"} , { 2, "D" }, { 4, "T" }, { 8, "t" },
180 { 16, "Z" }, { 32, "X" }, { 64, "x" },
181 { 128, "W" }) : "R",
175 __entry->next_comm, __entry->next_pid, __entry->next_prio) 182 __entry->next_comm, __entry->next_pid, __entry->next_prio)
176); 183);
177 184