diff options
author | Ingo Molnar <mingo@elte.hu> | 2007-07-11 15:21:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-13 13:11:17 -0400 |
commit | 4bd77321a833077c5c9ac7b9d284e261e4a8906e (patch) | |
tree | e24fadab783702c410b5bcf075f32f17ed11e58a /kernel/sched.c | |
parent | 45f384a64f0769bb9a3caf0516de88a629f48e61 (diff) |
[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>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 9088c2d97148..0559665a3a0b 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -4647,14 +4647,14 @@ static void show_task(struct task_struct *p) | |||
4647 | state = p->state ? __ffs(p->state) + 1 : 0; | 4647 | state = p->state ? __ffs(p->state) + 1 : 0; |
4648 | printk("%-13.13s %c", p->comm, | 4648 | printk("%-13.13s %c", p->comm, |
4649 | state < sizeof(stat_nam) - 1 ? stat_nam[state] : '?'); | 4649 | state < sizeof(stat_nam) - 1 ? stat_nam[state] : '?'); |
4650 | #if (BITS_PER_LONG == 32) | 4650 | #if BITS_PER_LONG == 32 |
4651 | if (state == TASK_RUNNING) | 4651 | if (state == TASK_RUNNING) |
4652 | printk(" running "); | 4652 | printk(" running "); |
4653 | else | 4653 | else |
4654 | printk(" %08lX ", thread_saved_pc(p)); | 4654 | printk(" %08lx ", thread_saved_pc(p)); |
4655 | #else | 4655 | #else |
4656 | if (state == TASK_RUNNING) | 4656 | if (state == TASK_RUNNING) |
4657 | printk(" running task "); | 4657 | printk(" running task "); |
4658 | else | 4658 | else |
4659 | printk(" %016lx ", thread_saved_pc(p)); | 4659 | printk(" %016lx ", thread_saved_pc(p)); |
4660 | #endif | 4660 | #endif |
@@ -4666,11 +4666,7 @@ static void show_task(struct task_struct *p) | |||
4666 | free = (unsigned long)n - (unsigned long)end_of_stack(p); | 4666 | free = (unsigned long)n - (unsigned long)end_of_stack(p); |
4667 | } | 4667 | } |
4668 | #endif | 4668 | #endif |
4669 | printk("%5lu %5d %6d", free, p->pid, p->parent->pid); | 4669 | printk("%5lu %5d %6d\n", free, p->pid, p->parent->pid); |
4670 | if (!p->mm) | ||
4671 | printk(" (L-TLB)\n"); | ||
4672 | else | ||
4673 | printk(" (NOTLB)\n"); | ||
4674 | 4670 | ||
4675 | if (state != TASK_RUNNING) | 4671 | if (state != TASK_RUNNING) |
4676 | show_stack(p, NULL); | 4672 | show_stack(p, NULL); |
@@ -4680,14 +4676,12 @@ void show_state_filter(unsigned long state_filter) | |||
4680 | { | 4676 | { |
4681 | struct task_struct *g, *p; | 4677 | struct task_struct *g, *p; |
4682 | 4678 | ||
4683 | #if (BITS_PER_LONG == 32) | 4679 | #if BITS_PER_LONG == 32 |
4684 | printk("\n" | 4680 | printk(KERN_INFO |
4685 | " free sibling\n"); | 4681 | " task PC stack pid father\n"); |
4686 | printk(" task PC stack pid father child younger older\n"); | ||
4687 | #else | 4682 | #else |
4688 | printk("\n" | 4683 | printk(KERN_INFO |
4689 | " free sibling\n"); | 4684 | " task PC stack pid father\n"); |
4690 | printk(" task PC stack pid father child younger older\n"); | ||
4691 | #endif | 4685 | #endif |
4692 | read_lock(&tasklist_lock); | 4686 | read_lock(&tasklist_lock); |
4693 | do_each_thread(g, p) { | 4687 | do_each_thread(g, p) { |