WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] xentop: tmem: no stats for non-tmem domains

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] xentop: tmem: no stats for non-tmem domains
From: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Tue, 2 Mar 2010 21:41:18 -0800 (PST)
Delivery-date: Tue, 02 Mar 2010 21:43:39 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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>

diff -r 4554b305228a tools/xenstat/libxenstat/src/xenstat.c
--- a/tools/xenstat/libxenstat/src/xenstat.c    Tue Mar 02 14:05:35 2010 +0000
+++ b/tools/xenstat/libxenstat/src/xenstat.c    Tue Mar 02 22:21:50 2010 -0700
@@ -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");

Attachment: tmem-xentop3.patch
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] xentop: tmem: no stats for non-tmem domains, Dan Magenheimer <=