|
@@ -421,13 +421,19 @@ static char *task_group_path(struct task_group *tg)
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
+static const char stat_nam[] = TASK_STATE_TO_CHAR_STR;
|
|
|
|
+
|
|
static void
|
|
static void
|
|
print_task(struct seq_file *m, struct rq *rq, struct task_struct *p)
|
|
print_task(struct seq_file *m, struct rq *rq, struct task_struct *p)
|
|
{
|
|
{
|
|
- if (rq->curr == p)
|
|
|
|
- SEQ_printf(m, "R");
|
|
|
|
- else
|
|
|
|
- SEQ_printf(m, " ");
|
|
|
|
|
|
+ unsigned long state;
|
|
|
|
+
|
|
|
|
+ if (rq->curr == p) {
|
|
|
|
+ SEQ_printf(m, ">R");
|
|
|
|
+ } else {
|
|
|
|
+ state = p->state ? __ffs(p->state) + 1 : 0;
|
|
|
|
+ SEQ_printf(m, " %c", state < sizeof(stat_nam) - 1 ? stat_nam[state] : '?');
|
|
|
|
+ }
|
|
|
|
|
|
SEQ_printf(m, "%15s %5d %9Ld.%06ld %9Ld %5d ",
|
|
SEQ_printf(m, "%15s %5d %9Ld.%06ld %9Ld %5d ",
|
|
p->comm, task_pid_nr(p),
|
|
p->comm, task_pid_nr(p),
|
|
@@ -456,9 +462,9 @@ static void print_rq(struct seq_file *m, struct rq *rq, int rq_cpu)
|
|
|
|
|
|
SEQ_printf(m,
|
|
SEQ_printf(m,
|
|
"\nrunnable tasks:\n"
|
|
"\nrunnable tasks:\n"
|
|
- " task PID tree-key switches prio"
|
|
|
|
|
|
+ " S task PID tree-key switches prio"
|
|
" wait-time sum-exec sum-sleep\n"
|
|
" wait-time sum-exec sum-sleep\n"
|
|
- "------------------------------------------------------"
|
|
|
|
|
|
+ "-------------------------------------------------------"
|
|
"----------------------------------------------------\n");
|
|
"----------------------------------------------------\n");
|
|
|
|
|
|
rcu_read_lock();
|
|
rcu_read_lock();
|