aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/schedule.c
diff options
context:
space:
mode:
authorDario Faggioli <dario.faggioli@citrix.com>2012-10-23 04:17:16 -0700
committerDario Faggioli <dario.faggioli@citrix.com>2012-10-23 04:17:16 -0700
commit5061a49c4e8ab1f6ec81dcb6bb2d5e3ba55a67fd (patch)
treec790db1455a4f1c9bc6ed93e69994e74e4835d1a /xen/common/schedule.c
parentfa17c2328e7071b9fb675cf5ab0a322c166181ff (diff)
downloadxen-5061a49c4e8ab1f6ec81dcb6bb2d5e3ba55a67fd.tar.gz
xen-5061a49c4e8ab1f6ec81dcb6bb2d5e3ba55a67fd.tar.bz2
xen-5061a49c4e8ab1f6ec81dcb6bb2d5e3ba55a67fd.zip
xen: sched: generalize scheduling related perfcounter macros
Moving some of them from sched_credit.c to generic scheduler code. This also allows the other schedulers to use perf counters equally easy. This change is mainly preparatory work for what stated above. In fact, it mostly does s/CSCHED_STAT/SCHED_STAT/, and, in general, it implies no functional changes. Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/common/schedule.c')
-rw-r--r--xen/common/schedule.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index 00812ac5b3..231e097475 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -312,11 +312,13 @@ void sched_destroy_vcpu(struct vcpu *v)
int sched_init_domain(struct domain *d)
{
+ SCHED_STAT_CRANK(dom_init);
return SCHED_OP(DOM2OP(d), init_domain, d);
}
void sched_destroy_domain(struct domain *d)
{
+ SCHED_STAT_CRANK(dom_destroy);
SCHED_OP(DOM2OP(d), destroy_domain, d);
}
@@ -1084,7 +1086,7 @@ static void schedule(void)
ASSERT(!in_atomic());
- perfc_incr(sched_run);
+ SCHED_STAT_CRANK(sched_run);
sd = &this_cpu(schedule_data);
@@ -1162,7 +1164,7 @@ static void schedule(void)
pcpu_schedule_unlock_irq(cpu);
- perfc_incr(sched_ctx);
+ SCHED_STAT_CRANK(sched_ctx);
stop_timer(&prev->periodic_timer);
@@ -1196,7 +1198,7 @@ void context_saved(struct vcpu *prev)
static void s_timer_fn(void *unused)
{
raise_softirq(SCHEDULE_SOFTIRQ);
- perfc_incr(sched_irq);
+ SCHED_STAT_CRANK(sched_irq);
}
/* Per-VCPU periodic timer function: sends a virtual timer interrupt. */