diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-08-18 14:22:48 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-08-18 14:22:48 +0100 |
commit | 6d91c142bca75bbac5bbc4ecea5da47967b6797b (patch) | |
tree | 637d82cd51564c843944fa0ceb0a639e8a60cf76 /xen/common/timer.c | |
parent | 2a9f4ae1adfa1029587590f9af1a373ae85155a4 (diff) | |
download | xen-6d91c142bca75bbac5bbc4ecea5da47967b6797b.tar.gz xen-6d91c142bca75bbac5bbc4ecea5da47967b6797b.tar.bz2 xen-6d91c142bca75bbac5bbc4ecea5da47967b6797b.zip |
timers: Improve debug-key printing.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/common/timer.c')
-rw-r--r-- | xen/common/timer.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/xen/common/timer.c b/xen/common/timer.c index 38540cee8c..52283cfad0 100644 --- a/xen/common/timer.c +++ b/xen/common/timer.c @@ -19,6 +19,7 @@ #include <xen/keyhandler.h> #include <xen/percpu.h> #include <xen/cpu.h> +#include <xen/symbols.h> #include <asm/system.h> #include <asm/desc.h> @@ -533,6 +534,13 @@ s_time_t align_timer(s_time_t firsttick, uint64_t period) return firsttick + (period - 1) - ((firsttick - 1) % period); } +static void dump_timer(struct timer *t, s_time_t now) +{ + printk(" ex=%8ldus timer=%p cb=%p(%p)", + (t->expires - now) / 1000, t, t->function, t->data); + print_symbol(" %s\n", (unsigned long)t->function); +} + static void dump_timerq(unsigned char key) { struct timer *t; @@ -541,28 +549,19 @@ static void dump_timerq(unsigned char key) s_time_t now = NOW(); int i, j; - printk("Dumping timer queues: NOW=0x%08X%08X\n", - (u32)(now>>32), (u32)now); + printk("Dumping timer queues:\n"); for_each_online_cpu( i ) { ts = &per_cpu(timers, i); - printk("CPU[%02d] ", i); + printk("CPU%02d:\n", i); spin_lock_irqsave(&ts->lock, flags); for ( j = 1; j <= GET_HEAP_SIZE(ts->heap); j++ ) - { - t = ts->heap[j]; - printk (" %d : %p ex=0x%08X%08X %p %p\n", - j, t, (u32)(t->expires>>32), (u32)t->expires, - t->data, t->function); - } + dump_timer(ts->heap[j], now); for ( t = ts->list, j = 0; t != NULL; t = t->list_next, j++ ) - printk (" L%d : %p ex=0x%08X%08X %p %p\n", - j, t, (u32)(t->expires>>32), (u32)t->expires, - t->data, t->function); + dump_timer(t, now); spin_unlock_irqrestore(&ts->lock, flags); - printk("\n"); } } |