WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH 4/6] trace: adjust printk()s

To: Jan Beulich <JBeulich@xxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH 4/6] trace: adjust printk()s
From: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Date: Wed, 30 Jun 2010 16:16:42 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 30 Jun 2010 08:18:13 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=0h42A8tS8Sn+o4Z0qV3Eyp4YSWEOp84Yf4klVLkhk2s=; b=o+mzZ1qUDEq/S1OJUCCMo3UqfNRNjmVV6zfvqXDNBHAnLc6796NvpJQyx/7uTNDWhz efU60NOnZC3Ct8MV4BZuujjxL0/YVZrJ4sAqmeocboGIXxtWsgPXr7509tuuwKCP7kL8 jGPvNVI2jhDkYqjw33A5LdeUobBMpKVlfAXZQ=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=w7q8oubge7GrbXzRjvGnioo/1n9SxOvbqkxMJGhxEgXIS6aoIc3rljb/G38CVBTG4v ZoKkQXygwe7JyrbVqK6OMzbvrSKz7snNc5x3Rx0VCijO72ujUJ3boHJiQIUFu56B4HBk R3IYuXESh6KFHodhsCzJxvPriFVmgkYW50P/s=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C2A2EEA0200007800008A88@xxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4C2A2EEA0200007800008A88@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Acked-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>

On Tue, Jun 29, 2010 at 4:35 PM, Jan Beulich <JBeulich@xxxxxxxxxx> wrote:
> They should be lower level or rate limited.
>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
>
> --- 2010-06-15.orig/xen/common/trace.c  2010-06-28 11:58:37.000000000 +0200
> +++ 2010-06-15/xen/common/trace.c       2010-06-29 17:04:45.000000000 +0200
> @@ -120,7 +120,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);
> @@ -177,7 +177,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;
>         }
> @@ -481,12 +481,13 @@ static inline int __insert_record(struct
>     /* 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();
>
>
>
>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>