xentrace_format supports a system that has more than 8 CPUs
PATCH 1/1 xentrace_format supports a system that has more than 8 CPUs
Hi, all
I ran xentrace_format on a machine of 16 CPUs and got the following error message:
Traceback (most recent call last):
File "/usr/bin/xentrace_format", line 114, in ?
if tsc < last_tsc[cpu]:
IndexError: list index out of range
This patch fixes this problem and remove the limit of #CPU in xentrace_format.
Signed-off-by KUWAMURA Shin'ya <[email protected]>
Thanks,
-- KUWAMURA Shin'ya
tools/xentrace/xentrace_format +4 -2
@@ -89,7 +89,7 @@ CPUREC = "I" CPUREC = "I" TRCREC = "QLLLLLL" -last_tsc = [0,0,0,0,0,0,0,0] +last_tsc = [0] i=0
@@ -111,7 +111,9 @@ while not interrupted: #print i, tsc - if tsc < last_tsc[cpu]: + if cpu >= len(last_tsc): + last_tsc += [0] * (cpu - len(last_tsc) + 1) + elif tsc < last_tsc[cpu]: print "TSC stepped backward cpu %d ! %d %d" % (cpu,tsc,last_tsc[cpu]) last_tsc[cpu] = tsc
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel