summaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2017-09-22 18:30:40 +0200
committerIngo Molnar <mingo@kernel.org>2017-09-29 11:02:56 +0200
commit06eb61844d841d0032a9950ce7f8e783ee49c0d0 (patch)
tree2c1db5ade5acc687e67f37d69e711bf0470df532 /include/trace
parent5f6ad26ea353fdf3dad2328052cbee49e0b9c5b4 (diff)
downloadop-kernel-dev-06eb61844d841d0032a9950ce7f8e783ee49c0d0.zip
op-kernel-dev-06eb61844d841d0032a9950ce7f8e783ee49c0d0.tar.gz
sched/debug: Add explicit TASK_IDLE printing
Markus reported that kthreads that idle using TASK_IDLE instead of TASK_INTERRUPTIBLE are reported in as TASK_UNINTERRUPTIBLE and things like htop mark those red. This is undesirable, so add an explicit state for TASK_IDLE. Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/sched.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
index c63e20c..b371ef8 100644
--- a/include/trace/events/sched.h
+++ b/include/trace/events/sched.h
@@ -156,10 +156,11 @@ TRACE_EVENT(sched_switch,
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 & TASK_REPORT) ?
- __print_flags(__entry->prev_state & TASK_REPORT, "|",
+ (__entry->prev_state & (TASK_REPORT_MAX - 1)) ?
+ __print_flags(__entry->prev_state & (TASK_REPORT_MAX - 1), "|",
{ 0x01, "S" }, { 0x02, "D" }, { 0x04, "T" },
- { 0x08, "t" }, { 0x10, "X" }, { 0x20, "Z" }) :
+ { 0x08, "t" }, { 0x10, "X" }, { 0x20, "Z" },
+ { 0x40, "I" }) :
"R",
__entry->prev_state & TASK_STATE_MAX ? "+" : "",
OpenPOWER on IntegriCloud