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-changelog

[Xen-changelog] [xen-4.0-testing] trace: adjust printk()s

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.0-testing] trace: adjust printk()s
From: "Xen patchbot-4.0-testing" <patchbot-4.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 02 Jul 2010 14:10:54 -0700
Delivery-date: Fri, 02 Jul 2010 14:13:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1278104647 -3600
# Node ID f423097dfa1c0958d4a5643e0e94f85b1a55dff4
# Parent  1972b4e9f34f2144f18e22cb783f4940b0b901b7
trace: adjust printk()s

They should be lower level or rate limited.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
Acked-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
xen-unstable changeset:   21705:19f4d637a52b
xen-unstable date:        Fri Jul 02 18:53:37 2010 +0100
---
 xen/common/trace.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff -r 1972b4e9f34f -r f423097dfa1c xen/common/trace.c
--- a/xen/common/trace.c        Fri Jul 02 22:03:43 2010 +0100
+++ b/xen/common/trace.c        Fri Jul 02 22:04:07 2010 +0100
@@ -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
     /* 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 )
-    {
-        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);
+    next = calc_bytes_avail(buf);
+    if ( next < 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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-4.0-testing] trace: adjust printk()s, Xen patchbot-4.0-testing <=