diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-07-02 22:04:07 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-07-02 22:04:07 +0100 |
commit | de5f046102bbb7180d1c41013ec36448887c2023 (patch) | |
tree | 2eb9f19ac18525d7f008b468e7d6dfa97978e592 | |
parent | 4625b0a3fc0db41dc5d2b852ba614f67178847a4 (diff) | |
download | xen-de5f046102bbb7180d1c41013ec36448887c2023.tar.gz xen-de5f046102bbb7180d1c41013ec36448887c2023.tar.bz2 xen-de5f046102bbb7180d1c41013ec36448887c2023.zip |
trace: adjust printk()s
They should be lower level or rate limited.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
xen-unstable changeset: 21705:19f4d637a52b
xen-unstable date: Fri Jul 02 18:53:37 2010 +0100
-rw-r--r-- | xen/common/trace.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/xen/common/trace.c b/xen/common/trace.c index e61b088f6f..9c0f9515c0 100644 --- a/xen/common/trace.c +++ b/xen/common/trace.c @@ -137,7 +137,7 @@ static int alloc_trace_bufs(void) } t_info->tbuf_size = opt_tbuf_size; - printk("tbuf_size %d\n", t_info->tbuf_size); + printk(XENLOG_INFO "tbuf_size %d\n", t_info->tbuf_size); nr_pages = opt_tbuf_size; order = get_order_from_pages(nr_pages); @@ -194,7 +194,7 @@ static int alloc_trace_bufs(void) /* Write list first, then write per-cpu offset. */ wmb(); t_info->mfn_offset[cpu]=offset; - printk("p%d mfn %"PRIx32" offset %d\n", + printk(XENLOG_INFO "p%d mfn %"PRIx32" offset %d\n", cpu, mfn, offset); offset+=i; } @@ -489,12 +489,13 @@ static inline int __insert_record(struct t_buf *buf, /* Double-check once more that we have enough space. * Don't bugcheck here, in case the userland tool is doing * something stupid. */ - if ( calc_bytes_avail(buf) < rec_size ) + next = calc_bytes_avail(buf); + if ( next < rec_size ) { - printk("%s: %u bytes left (%u - ((%u - %u) %% %u) recsize %u.\n", - __func__, - calc_bytes_avail(buf), - data_size, buf->prod, buf->cons, data_size, rec_size); + if ( printk_ratelimit() ) + printk(XENLOG_WARNING + "%s: avail=%u (size=%08x prod=%08x cons=%08x) rec=%u\n", + __func__, next, data_size, buf->prod, buf->cons, rec_size); return 0; } rmb(); |