All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perfc: count number of explicit vcpu yields
@ 2015-11-09 14:00 Ian Campbell
  2015-11-09 14:09 ` Jan Beulich
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Ian Campbell @ 2015-11-09 14:00 UTC (permalink / raw)
  To: xen-devel; +Cc: Dario Faggioli, george.dunlap, jbeulich, Ian Campbell

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/common/schedule.c        | 1 +
 xen/include/xen/perfc_defn.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index 292e9a0..86d6cc0 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -896,6 +896,7 @@ long vcpu_yield(void)
     struct vcpu * v=current;
     spinlock_t *lock = vcpu_schedule_lock_irq(v);
 
+    SCHED_STAT_CRANK(sched_yield);
     SCHED_OP(VCPU2OP(v), yield, v);
     vcpu_schedule_unlock_irq(lock, v);
 
diff --git a/xen/include/xen/perfc_defn.h b/xen/include/xen/perfc_defn.h
index 76ee803..034c7d3 100644
--- a/xen/include/xen/perfc_defn.h
+++ b/xen/include/xen/perfc_defn.h
@@ -16,6 +16,7 @@ PERFCOUNTER(ipis,                   "#IPIs")
 PERFCOUNTER(sched_irq,              "sched: timer")
 PERFCOUNTER(sched_run,              "sched: runs through scheduler")
 PERFCOUNTER(sched_ctx,              "sched: context switches")
+PERFCOUNTER(sched_yield,            "sched: vcpu yield")
 PERFCOUNTER(schedule,               "sched: specific scheduler")
 PERFCOUNTER(dom_init,               "sched: dom_init")
 PERFCOUNTER(dom_destroy,            "sched: dom_destroy")
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-11-09 16:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-09 14:00 [PATCH] perfc: count number of explicit vcpu yields Ian Campbell
2015-11-09 14:09 ` Jan Beulich
2015-11-09 14:14 ` George Dunlap
2015-11-09 14:53 ` Dario Faggioli
2015-11-09 15:02   ` Boris Ostrovsky
2015-11-09 15:14     ` Dario Faggioli
2015-11-09 15:23       ` Ian Campbell
2015-11-09 15:47         ` Dario Faggioli
2015-11-09 16:03           ` Konrad Rzeszutek Wilk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.