summaryrefslogtreecommitdiffstats
path: root/include/trace/events/sched.h
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-08 10:47:46 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-08 10:47:46 +0000
commit41966710ab574f1fcedf3e10e1ceef911c096d1d (patch)
treea370f9fb2392267d1e7b06d7c9f43c6d80eb12be /include/trace/events/sched.h
parent4633fa48fb41dc6d6f0cd83d7f6b7e262820e7cb (diff)
parent1dd6c0770d7d4ca477a1a8452ab0161b1150e4ad (diff)
Merge branch 'for-3.2' into for-3.3
Diffstat (limited to 'include/trace/events/sched.h')
-rw-r--r--include/trace/events/sched.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
index f6334782a59..959ff18b63b 100644
--- a/include/trace/events/sched.h
+++ b/include/trace/events/sched.h
@@ -100,7 +100,7 @@ static inline long __trace_sched_switch_state(struct task_struct *p)
* For all intents and purposes a preempted task is a running task.
*/
if (task_thread_info(p)->preempt_count & PREEMPT_ACTIVE)
- state = TASK_RUNNING;
+ state = TASK_RUNNING | TASK_STATE_MAX;
#endif
return state;
@@ -137,13 +137,14 @@ TRACE_EVENT(sched_switch,
__entry->next_prio = next->prio;
),
- TP_printk("prev_comm=%s prev_pid=%d prev_prio=%d prev_state=%s ==> next_comm=%s next_pid=%d next_prio=%d",
+ TP_printk("prev_comm=%s prev_pid=%d prev_prio=%d prev_state=%s%s ==> next_comm=%s next_pid=%d next_prio=%d",
__entry->prev_comm, __entry->prev_pid, __entry->prev_prio,
- __entry->prev_state ?
- __print_flags(__entry->prev_state, "|",
+ __entry->prev_state & (TASK_STATE_MAX-1) ?
+ __print_flags(__entry->prev_state & (TASK_STATE_MAX-1), "|",
{ 1, "S"} , { 2, "D" }, { 4, "T" }, { 8, "t" },
{ 16, "Z" }, { 32, "X" }, { 64, "x" },
{ 128, "W" }) : "R",
+ __entry->prev_state & TASK_STATE_MAX ? "+" : "",
__entry->next_comm, __entry->next_pid, __entry->next_prio)
);