소스 검색

[PATCH] sched: fix show_task()/show_tasks() output

fix show_task()/show_tasks() output:

- there's no sibling info anymore

- the fields were not aligned properly with the description

- get rid of the lazy-TLB output: it's been quite some time since
  we last had a bug there, and when we had a bug it wasnt helped a
  bit by this debug output.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ingo Molnar 18 년 전
부모
커밋
4bd77321a8
1개의 변경된 파일10개의 추가작업 그리고 16개의 파일을 삭제
  1. 10 16
      kernel/sched.c

+ 10 - 16
kernel/sched.c

@@ -4647,14 +4647,14 @@ static void show_task(struct task_struct *p)
 	state = p->state ? __ffs(p->state) + 1 : 0;
 	state = p->state ? __ffs(p->state) + 1 : 0;
 	printk("%-13.13s %c", p->comm,
 	printk("%-13.13s %c", p->comm,
 		state < sizeof(stat_nam) - 1 ? stat_nam[state] : '?');
 		state < sizeof(stat_nam) - 1 ? stat_nam[state] : '?');
-#if (BITS_PER_LONG == 32)
+#if BITS_PER_LONG == 32
 	if (state == TASK_RUNNING)
 	if (state == TASK_RUNNING)
-		printk(" running ");
+		printk(" running  ");
 	else
 	else
-		printk(" %08lX ", thread_saved_pc(p));
+		printk(" %08lx ", thread_saved_pc(p));
 #else
 #else
 	if (state == TASK_RUNNING)
 	if (state == TASK_RUNNING)
-		printk("  running task   ");
+		printk("  running task    ");
 	else
 	else
 		printk(" %016lx ", thread_saved_pc(p));
 		printk(" %016lx ", thread_saved_pc(p));
 #endif
 #endif
@@ -4666,11 +4666,7 @@ static void show_task(struct task_struct *p)
 		free = (unsigned long)n - (unsigned long)end_of_stack(p);
 		free = (unsigned long)n - (unsigned long)end_of_stack(p);
 	}
 	}
 #endif
 #endif
-	printk("%5lu %5d %6d", free, p->pid, p->parent->pid);
-	if (!p->mm)
-		printk(" (L-TLB)\n");
-	else
-		printk(" (NOTLB)\n");
+	printk("%5lu %5d %6d\n", free, p->pid, p->parent->pid);
 
 
 	if (state != TASK_RUNNING)
 	if (state != TASK_RUNNING)
 		show_stack(p, NULL);
 		show_stack(p, NULL);
@@ -4680,14 +4676,12 @@ void show_state_filter(unsigned long state_filter)
 {
 {
 	struct task_struct *g, *p;
 	struct task_struct *g, *p;
 
 
-#if (BITS_PER_LONG == 32)
-	printk("\n"
-	       "                         free                        sibling\n");
-	printk("  task             PC    stack   pid father child younger older\n");
+#if BITS_PER_LONG == 32
+	printk(KERN_INFO
+		"  task                PC stack   pid father\n");
 #else
 #else
-	printk("\n"
-	       "                                 free                        sibling\n");
-	printk("  task                 PC        stack   pid father child younger older\n");
+	printk(KERN_INFO
+		"  task                        PC stack   pid father\n");
 #endif
 #endif
 	read_lock(&tasklist_lock);
 	read_lock(&tasklist_lock);
 	do_each_thread(g, p) {
 	do_each_thread(g, p) {