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: Clear lost records when disabli

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xentrace: Clear lost records when disabling tracing
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 03 Feb 2010 01:55:17 -0800
Delivery-date: Wed, 03 Feb 2010 01:55:50 -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 1265189756 0
# Node ID 2a07df55c08af39477862e6e45868cae7c4c06cc
# Parent  6ade83cb21ca6a102c598decb9893969b607715d
xentrace: Clear lost records when disabling tracing

This patch clears the "lost records" flag on each cpu when tracing is
disabled.

Without this patch, the next time tracing starts, cpus with lost
records will generate lost record traces, even though buffers are
empty and no tracing has recently happened.

Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
---
 xen/common/trace.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+)

diff -r 6ade83cb21ca -r 2a07df55c08a xen/common/trace.c
--- a/xen/common/trace.c        Wed Feb 03 09:35:23 2010 +0000
+++ b/xen/common/trace.c        Wed Feb 03 09:35:56 2010 +0000
@@ -316,11 +316,26 @@ int tb_control(xen_sysctl_tbuf_op_t *tbc
             tb_init_done = 1;
         break;
     case XEN_SYSCTL_TBUFOP_disable:
+    {
         /*
          * Disable trace buffers. Just stops new records from being written,
          * does not deallocate any memory.
          */
+        int i;
+
         tb_init_done = 0;
+        wmb();
+        /* Clear any lost-record info so we don't get phantom lost records 
next time we
+         * start tracing.  Grab the lock to make sure we're not racing anyone. 
 After this
+         * hypercall returns, no more records should be placed into the 
buffers. */
+        for_each_online_cpu(i)
+        {
+            int flags;
+            spin_lock_irqsave(&per_cpu(t_lock, i), flags);
+            per_cpu(lost_records, i)=0;
+            spin_unlock_irqrestore(&per_cpu(t_lock, i), flags);
+        }
+    }
         break;
     default:
         rc = -EINVAL;

_______________________________________________
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: Clear lost records when disabling tracing, Xen patchbot-unstable <=