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-unstable] xentrace: Disable tracing, then read reco

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xentrace: Disable tracing, then read records one more time.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 03 Feb 2010 01:55:18 -0800
Delivery-date: Wed, 03 Feb 2010 01:55:58 -0800
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 1265189797 0
# Node ID 0e453e4d932ddd4aa687be5d85e3a00c29cac600
# Parent  2a07df55c08af39477862e6e45868cae7c4c06cc
xentrace: Disable tracing, then read records one more time.

When interrupted, first disable tracing, then read through the records
one last time.

Without this patch, it's possible to get traces which interact (such
as runstate changes) on processors with higher numbers, while missing
the corresponding traces generated on lower-numbered processors.

Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
---
 tools/xentrace/xentrace.c |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff -r 2a07df55c08a -r 0e453e4d932d tools/xentrace/xentrace.c
--- a/tools/xentrace/xentrace.c Wed Feb 03 09:35:56 2010 +0000
+++ b/tools/xentrace/xentrace.c Wed Feb 03 09:36:37 2010 +0000
@@ -634,6 +634,8 @@ static int monitor_tbufs(void)
 
     unsigned long data_size;
 
+    int last_read = 1;
+
     /* prepare to listen for VIRQ_TBUF */
     event_init();
 
@@ -712,13 +714,21 @@ static int monitor_tbufs(void)
         }
 
         if ( interrupted )
-            break;
+        {
+            if ( last_read )
+            {
+                /* Disable tracing, then read through all the buffers one last 
time */
+                if ( opts.disable_tracing )
+                    disable_tbufs();
+                last_read = 0;
+                continue;
+            }
+            else
+                break;
+        }
 
         wait_for_event_or_timeout(opts.poll_sleep);
     }
-
-    if ( opts.disable_tracing )
-        disable_tbufs();
 
     if ( opts.memory_buffer )
         membuf_dump();

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xentrace: Disable tracing, then read records one more time., Xen patchbot-unstable <=