ia64/xen-unstable

changeset 15722:ff2dae3ebb1d

xentop: fix abnormal value cpu(%) when domain shutdown.

If we test multiple domain create/shutdown many times.
sometimes abnormal values of cpu(%) are appeared.
This is because shutdown domain remove failure.
(in other words, memory corruption of struct )
This corruption makes abnormal cpu(%) values are shown xentop
sometimes.

Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
author kfraser@localhost.localdomain
date Tue Aug 07 09:06:38 2007 +0100 (2007-08-07)
parents 007a11317ce8
children 7953164cebb6
files tools/xenstat/libxenstat/src/xenstat.c
line diff
     1.1 --- a/tools/xenstat/libxenstat/src/xenstat.c	Tue Aug 07 09:04:44 2007 +0100
     1.2 +++ b/tools/xenstat/libxenstat/src/xenstat.c	Tue Aug 07 09:06:38 2007 +0100
     1.3 @@ -677,7 +677,7 @@ static void xenstat_prune_domain(xenstat
     1.4  	/* shift entries following specified entry up by one */
     1.5  	if (entry < node->num_domains) {
     1.6  		xenstat_domain *domain = &node->domains[entry];
     1.7 -		memmove(domain,domain+1,node->num_domains-entry);
     1.8 +		memmove(domain,domain+1,(node->num_domains - entry) * sizeof(xenstat_domain) );
     1.9  	}
    1.10  
    1.11  	/* zero out original last entry from node -- not