diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-05-16 09:37:19 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-05-16 09:37:19 +0100 |
commit | 2950bd57c142d3d60f0368fdc9a8d625a1c9f623 (patch) | |
tree | b49064913ca480422ce80473360a0dcabe18b96d /xen/common/sysctl.c | |
parent | 652c2b91745604cf1645947e572875bf86ff7f94 (diff) | |
download | xen-2950bd57c142d3d60f0368fdc9a8d625a1c9f623.tar.gz xen-2950bd57c142d3d60f0368fdc9a8d625a1c9f623.tar.bz2 xen-2950bd57c142d3d60f0368fdc9a8d625a1c9f623.zip |
Provide Px statistic data to user through libxc
Sampling and collecting dynamic Px statistic data, including
Px state value, Px count, Px residency time, Px transition
matrix, etc. Provide Px statistic data to user through libxc.
Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
Diffstat (limited to 'xen/common/sysctl.c')
-rw-r--r-- | xen/common/sysctl.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c index 1b9c6a58a8..0b32378df7 100644 --- a/xen/common/sysctl.c +++ b/xen/common/sysctl.c @@ -25,6 +25,8 @@ #include <xen/nodemask.h> #include <xsm/xsm.h> +extern int do_get_pm_info(struct xen_sysctl_get_pmstat *op); + extern long arch_do_sysctl( struct xen_sysctl *op, XEN_GUEST_HANDLE(xen_sysctl_t) u_sysctl); @@ -196,6 +198,20 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysctl_t) u_sysctl) } break; + case XEN_SYSCTL_get_pmstat: + { + ret = do_get_pm_info(&op->u.get_pmstat); + if ( ret ) + break; + + if ( copy_to_guest(u_sysctl, op, 1) ) + { + ret = -EFAULT; + break; + } + } + break; + default: ret = arch_do_sysctl(op, u_sysctl); break; |