aboutsummaryrefslogtreecommitdiffstats
path: root/tools/misc/xenperf.c
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2010-10-18 17:37:31 +0100
committerIan Campbell <ian.campbell@citrix.com>2010-10-18 17:37:31 +0100
commit656ba9748a4af226415bf77039a20a1948444445 (patch)
treef0876fb377f6f4f7628e2813aad37bcda80ba862 /tools/misc/xenperf.c
parent5924f32d9c26f2b9475ea08499fbd5ca95df332c (diff)
downloadxen-656ba9748a4af226415bf77039a20a1948444445.tar.gz
xen-656ba9748a4af226415bf77039a20a1948444445.tar.bz2
xen-656ba9748a4af226415bf77039a20a1948444445.zip
libxc: simplify performance counters API
Current function has heavily overloaded semantics for the various arguments. Separate out into more specific functions. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/misc/xenperf.c')
-rw-r--r--tools/misc/xenperf.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/tools/misc/xenperf.c b/tools/misc/xenperf.c
index 3730efdbb7..583abc1f82 100644
--- a/tools/misc/xenperf.c
+++ b/tools/misc/xenperf.c
@@ -137,8 +137,7 @@ int main(int argc, char *argv[])
if ( reset )
{
- if ( xc_perfc_control(xc_handle, XEN_SYSCTL_PERFCOP_reset,
- NULL, NULL, NULL, NULL) != 0 )
+ if ( xc_perfc_reset(xc_handle) != 0 )
{
fprintf(stderr, "Error reseting performance counters: %d (%s)\n",
errno, strerror(errno));
@@ -148,8 +147,7 @@ int main(int argc, char *argv[])
return 0;
}
- if ( xc_perfc_control(xc_handle, XEN_SYSCTL_PERFCOP_query,
- NULL, NULL, &num_desc, &num_val) != 0 )
+ if ( xc_perfc_query_number(xc_handle, &num_desc, &num_val) != 0 )
{
fprintf(stderr, "Error getting number of perf counters: %d (%s)\n",
errno, strerror(errno));
@@ -169,8 +167,7 @@ int main(int argc, char *argv[])
exit(-1);
}
- if ( xc_perfc_control(xc_handle, XEN_SYSCTL_PERFCOP_query,
- pcd, pcv, NULL, NULL) != 0 )
+ if ( xc_perfc_query(xc_handle, pcd, pcv) != 0 )
{
fprintf(stderr, "Error getting perf counter: %d (%s)\n",
errno, strerror(errno));