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] Bug fix for debugtrace_dump stuff.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Bug fix for debugtrace_dump stuff.
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Mon, 14 Mar 2005 18:44:10 +0000
Delivery-date: Tue, 05 Apr 2005 16:07:05 +0000
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1236.32.1, 2005/03/14 18:44:10+00:00, mafetter@xxxxxxxxxxxxxxxx

        Bug fix for debugtrace_dump stuff.
        
        Signed-off-by: michael.fetterman@xxxxxxxxxxxx



 console.c |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)


diff -Nru a/xen/drivers/char/console.c b/xen/drivers/char/console.c
--- a/xen/drivers/char/console.c        2005-04-05 12:07:10 -04:00
+++ b/xen/drivers/char/console.c        2005-04-05 12:07:10 -04:00
@@ -511,7 +511,10 @@
 
     spin_lock_irqsave(&debugtrace_lock, flags);
 
+    printk("debugtrace_dump() starting\n");
+
     /* Print oldest portion of the ring. */
+    ASSERT(debugtrace_buf[debugtrace_bytes - 1] == 0);
     serial_puts(sercon_handle, &debugtrace_buf[debugtrace_prd]);
 
     /* Print youngest portion of the ring. */
@@ -520,6 +523,8 @@
 
     memset(debugtrace_buf, '\0', debugtrace_bytes);
 
+    printk("debugtrace_dump() finished\n");
+
     spin_unlock_irqrestore(&debugtrace_lock, flags);
 
     watchdog_on = _watchdog_on;
@@ -538,6 +543,8 @@
 
     spin_lock_irqsave(&debugtrace_lock, flags);
 
+    ASSERT(debugtrace_buf[debugtrace_bytes - 1] == 0);
+
     va_start(args, fmt);
     (void)vsnprintf(buf, sizeof(buf), fmt, args);
     va_end(args);
@@ -563,19 +570,23 @@
 static int __init debugtrace_init(void)
 {
     int order;
-    unsigned int kbytes;
+    unsigned int kbytes, bytes;
 
     /* Round size down to next power of two. */
     while ( (kbytes = (debugtrace_kilobytes & (debugtrace_kilobytes-1))) != 0 )
         debugtrace_kilobytes = kbytes;
 
-    debugtrace_bytes = debugtrace_kilobytes << 10;
-    if ( debugtrace_bytes == 0 )
+    bytes = debugtrace_kilobytes << 10;
+    if ( bytes == 0 )
         return 0;
 
-    order = get_order(debugtrace_bytes);
+    order = get_order(bytes);
     debugtrace_buf = (unsigned char *)alloc_xenheap_pages(order);
     ASSERT(debugtrace_buf != NULL);
+
+    memset(debugtrace_buf, '\0', bytes);
+
+    debugtrace_bytes = bytes;
 
     return 0;
 }

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Bug fix for debugtrace_dump stuff., BitKeeper Bot <=