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: trace when we continue with the

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xentrace: trace when we continue with the same task
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 11 Mar 2009 03:30:19 -0700
Delivery-date: Wed, 11 Mar 2009 03:30:41 -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 1236610894 0
# Node ID d035b66b5b4db5afd42b1ac0bb4ec6bce0c4ece3
# Parent  e7702951fc09f97052f55b3ad6bb30df1f4b9cd0
xentrace: trace when we continue with the same task

Trace when the scheduler decides to continue running the same process.
This lets us see that this is happening for one; it also lets us see
domains in a trace which are actively running on pcpu but never
scheduled out.

Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
---
 xen/common/schedule.c      |   15 +++++++++++++++
 xen/include/public/trace.h |    3 ++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff -r e7702951fc09 -r d035b66b5b4d xen/common/schedule.c
--- a/xen/common/schedule.c     Mon Mar 09 13:52:59 2009 +0000
+++ b/xen/common/schedule.c     Mon Mar 09 15:01:34 2009 +0000
@@ -81,6 +81,20 @@ static inline void trace_runstate_change
     __trace_var(event, 1/*tsc*/, sizeof(d), (unsigned char *)&d);
 }
 
+static inline void trace_continue_running(struct vcpu *v)
+{
+    struct { uint32_t vcpu:16, domain:16; } d;
+
+    if ( likely(!tb_init_done) )
+        return;
+
+    d.vcpu = v->vcpu_id;
+    d.domain = v->domain->domain_id;
+
+    __trace_var(TRC_SCHED_CONTINUE_RUNNING, 1/*tsc*/, sizeof(d),
+                (unsigned char *)&d);
+}
+
 static inline void vcpu_runstate_change(
     struct vcpu *v, int new_state, s_time_t new_entry_time)
 {
@@ -803,6 +817,7 @@ static void schedule(void)
     if ( unlikely(prev == next) )
     {
         spin_unlock_irq(&sd->schedule_lock);
+        trace_continue_running(next);
         return continue_running(prev);
     }
 
diff -r e7702951fc09 -r d035b66b5b4d xen/include/public/trace.h
--- a/xen/include/public/trace.h        Mon Mar 09 13:52:59 2009 +0000
+++ b/xen/include/public/trace.h        Mon Mar 09 15:01:34 2009 +0000
@@ -60,7 +60,8 @@
 #define TRC_TRACE_WRAP_BUFFER  (TRC_GEN + 2)
 #define TRC_TRACE_CPU_CHANGE    (TRC_GEN + 3)
 
-#define TRC_SCHED_RUNSTATE_CHANGE (TRC_SCHED_MIN + 1)
+#define TRC_SCHED_RUNSTATE_CHANGE   (TRC_SCHED_MIN + 1)
+#define TRC_SCHED_CONTINUE_RUNNING  (TRC_SCHED_MIN + 2)
 #define TRC_SCHED_DOM_ADD        (TRC_SCHED_VERBOSE +  1)
 #define TRC_SCHED_DOM_REM        (TRC_SCHED_VERBOSE +  2)
 #define TRC_SCHED_SLEEP          (TRC_SCHED_VERBOSE +  3)

_______________________________________________
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: trace when we continue with the same task, Xen patchbot-unstable <=