* [PATCH] xentop: tmem: no stats for non-tmem domains
@ 2010-03-03 5:41 Dan Magenheimer
0 siblings, 0 replies; only message in thread
From: Dan Magenheimer @ 2010-03-03 5:41 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 908 bytes --]
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>
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 #2: tmem-xentop3.patch --]
[-- Type: application/octet-stream, Size: 725 bytes --]
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 #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-03 5:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-03 5:41 [PATCH] xentop: tmem: no stats for non-tmem domains Dan Magenheimer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).