debuggers.hg

changeset 21042:401c0012b827

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>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Mar 03 17:40:48 2010 +0000 (2010-03-03)
parents 6c338a5830b5
children b8d2a4134a68
files tools/xenstat/libxenstat/src/xenstat.c
line diff
     1.1 --- a/tools/xenstat/libxenstat/src/xenstat.c	Wed Mar 03 17:40:22 2010 +0000
     1.2 +++ b/tools/xenstat/libxenstat/src/xenstat.c	Wed Mar 03 17:40:48 2010 +0000
     1.3 @@ -149,8 +149,9 @@ void domain_get_tmem_stats(xenstat_handl
     1.4  {
     1.5  	char buffer[4096];
     1.6  
     1.7 -	xc_tmem_control(handle->xc_handle,-1,TMEMC_LIST,domain->id,
     1.8 -                        sizeof(buffer),-1,-1,buffer);
     1.9 +	if (xc_tmem_control(handle->xc_handle,-1,TMEMC_LIST,domain->id,
    1.10 +                        sizeof(buffer),-1,-1,buffer) < 0)
    1.11 +		return;
    1.12  	domain->tmem_stats.curr_eph_pages = parse(buffer,"Ec");
    1.13  	domain->tmem_stats.succ_eph_gets = parse(buffer,"Ge");
    1.14  	domain->tmem_stats.succ_pers_puts = parse(buffer,"Pp");