aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xentrace/xentrace_format
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-05-19 15:52:35 +0100
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-05-19 15:52:35 +0100
commite1b53df502092ecbb66e4678c1d81dd9cbcc9404 (patch)
treec79a91fa5e0b525da08194d1531d77bb3bf45474 /tools/xentrace/xentrace_format
parentcd04d3a53867fa94decd288116df571048e9617f (diff)
downloadxen-e1b53df502092ecbb66e4678c1d81dd9cbcc9404.tar.gz
xen-e1b53df502092ecbb66e4678c1d81dd9cbcc9404.tar.bz2
xen-e1b53df502092ecbb66e4678c1d81dd9cbcc9404.zip
Fix xentrace_format to deal with more than 16 CPUs.
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
Diffstat (limited to 'tools/xentrace/xentrace_format')
-rw-r--r--tools/xentrace/xentrace_format6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/xentrace/xentrace_format b/tools/xentrace/xentrace_format
index 827680b95e..537785824a 100644
--- a/tools/xentrace/xentrace_format
+++ b/tools/xentrace/xentrace_format
@@ -89,7 +89,7 @@ defs = read_defs(arg[0])
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