diff options
author | Dario Faggioli <dario.faggioli@citrix.com> | 2012-10-23 04:17:16 -0700 |
---|---|---|
committer | Dario Faggioli <dario.faggioli@citrix.com> | 2012-10-23 04:17:16 -0700 |
commit | 5061a49c4e8ab1f6ec81dcb6bb2d5e3ba55a67fd (patch) | |
tree | c790db1455a4f1c9bc6ed93e69994e74e4835d1a /xen/include/xen/sched.h | |
parent | fa17c2328e7071b9fb675cf5ab0a322c166181ff (diff) | |
download | xen-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/include/xen/sched.h')
-rw-r--r-- | xen/include/xen/sched.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index b0def4a424..6c5503978f 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -16,6 +16,7 @@ #include <xen/tasklet.h> #include <xen/mm.h> #include <xen/smp.h> +#include <xen/perfc.h> #include <asm/atomic.h> #include <xen/wait.h> #include <public/xen.h> @@ -29,6 +30,18 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_runstate_info_compat_t); #endif +/* + * Stats + * + * Enable and ease the use of scheduling related performance counters. + * + */ +#ifdef PERF_COUNTERS +#define SCHED_STATS +#endif + +#define SCHED_STAT_CRANK(_X) (perfc_incr(_X)) + /* A global pointer to the initial domain (DOM0). */ extern struct domain *dom0; |