[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] xentrace: trace when we continue with the same task
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |