[RFC PATCH 6/6] timer_stats: make output more readable

From: Yong Zhang
Date: Sun Aug 29 2010 - 11:07:08 EST


From: Yong Zhang <yong.zhang@xxxxxxxxxxxxx>

When running timer_stats for a little long time, the output
will be not aligned anymore because the volume of sample count
and pid will expand.

Signed-off-by: Yong Zhang <yong.zhang0@xxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
---
kernel/time/timer_stats.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/time/timer_stats.c b/kernel/time/timer_stats.c
index 2f3b585..da85b3e 100644
--- a/kernel/time/timer_stats.c
+++ b/kernel/time/timer_stats.c
@@ -307,10 +307,10 @@ static int tstats_show(struct seq_file *m, void *v)
for (i = 0; i < nr_entries; i++) {
entry = entries + i;
if (entry->timer_flag & TIMER_STATS_FLAG_DEFERRABLE) {
- seq_printf(m, "%4luD, %5d %-16s ",
+ seq_printf(m, "%10luD, %10d %-16s ",
entry->count, entry->pid, entry->comm);
} else {
- seq_printf(m, " %4lu, %5d %-16s ",
+ seq_printf(m, " %10lu, %10d %-16s ",
entry->count, entry->pid, entry->comm);
}

--
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/