From 23d071af598cf08018d2a7b087675fa50fc4b476 Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Fri, 16 Sep 2011 11:16:43 +0200 Subject: [PATCH] --- yaml --- r: 269161 b: refs/heads/master c: 557ab425429a5123d37f412ce3e6d6137cb621f8 h: refs/heads/master i: 269159: c9ae731634170e648a7bd62573eb00ae34dabca3 v: v3 --- [refs] | 2 +- trunk/include/trace/events/sched.h | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index d97a7d4cf7c6..6e37b09ec9fe 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f4cfb33ed980085b14a8f376281edb2e270f0244 +refs/heads/master: 557ab425429a5123d37f412ce3e6d6137cb621f8 diff --git a/trunk/include/trace/events/sched.h b/trunk/include/trace/events/sched.h index f6334782a593..959ff18b63b6 100644 --- a/trunk/include/trace/events/sched.h +++ b/trunk/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) );