aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstat
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-03-03 17:40:48 +0000
committerKeir Fraser <keir.fraser@citrix.com>2010-03-03 17:40:48 +0000
commit41a3140ea215538a0243b048ec55523f090c15f2 (patch)
tree8bbb24592cc2967aed75d468a0e3ec6ebfc9f170 /tools/xenstat
parentad709c500b91259d8557fcb8232dac7629756b75 (diff)
downloadxen-41a3140ea215538a0243b048ec55523f090c15f2.tar.gz
xen-41a3140ea215538a0243b048ec55523f090c15f2.tar.bz2
xen-41a3140ea215538a0243b048ec55523f090c15f2.zip
xentop: tmem: no stats for non-tmem domains
In xentop, don't re-use and print stale data of previous tmem domain for subsequent non-tmem domain. Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Diffstat (limited to 'tools/xenstat')
-rw-r--r--tools/xenstat/libxenstat/src/xenstat.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/xenstat/libxenstat/src/xenstat.c b/tools/xenstat/libxenstat/src/xenstat.c
index 6396f5959d..60b1a50a94 100644
--- a/tools/xenstat/libxenstat/src/xenstat.c
+++ b/tools/xenstat/libxenstat/src/xenstat.c
@@ -149,8 +149,9 @@ void domain_get_tmem_stats(xenstat_handle * handle, xenstat_domain * domain)
{
char buffer[4096];
- xc_tmem_control(handle->xc_handle,-1,TMEMC_LIST,domain->id,
- sizeof(buffer),-1,-1,buffer);
+ if (xc_tmem_control(handle->xc_handle,-1,TMEMC_LIST,domain->id,
+ sizeof(buffer),-1,-1,buffer) < 0)
+ return;
domain->tmem_stats.curr_eph_pages = parse(buffer,"Ec");
domain->tmem_stats.succ_eph_gets = parse(buffer,"Ge");
domain->tmem_stats.succ_pers_puts = parse(buffer,"Pp");