[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xentop: tmem: no stats for non-tmem domains



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1267638048 0
# Node ID 401c0012b8273dbe6711c48d9d5bd2409808330f
# Parent  6c338a5830b524a17290285fd02fa442927b1d52
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@xxxxxxxxxx>
---
 tools/xenstat/libxenstat/src/xenstat.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff -r 6c338a5830b5 -r 401c0012b827 tools/xenstat/libxenstat/src/xenstat.c
--- a/tools/xenstat/libxenstat/src/xenstat.c    Wed Mar 03 17:40:22 2010 +0000
+++ b/tools/xenstat/libxenstat/src/xenstat.c    Wed Mar 03 17:40:48 2010 +0000
@@ -149,8 +149,9 @@ void domain_get_tmem_stats(xenstat_handl
 {
        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");

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.