ia64/xen-unstable
changeset 10105:167790b102ac
Fix xentrace_format to deal with more than 16 CPUs.
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Fri May 19 15:52:35 2006 +0100 (2006-05-19) |
parents | a5ef851c217b |
children | 292b4d017d56 ea609f28ec01 |
files | tools/xentrace/xentrace_format |
line diff
1.1 --- a/tools/xentrace/xentrace_format Fri May 19 15:51:26 2006 +0100 1.2 +++ b/tools/xentrace/xentrace_format Fri May 19 15:52:35 2006 +0100 1.3 @@ -89,7 +89,7 @@ defs = read_defs(arg[0]) 1.4 CPUREC = "I" 1.5 TRCREC = "QLLLLLL" 1.6 1.7 -last_tsc = [0,0,0,0,0,0,0,0] 1.8 +last_tsc = [0] 1.9 1.10 i=0 1.11 1.12 @@ -111,7 +111,9 @@ while not interrupted: 1.13 1.14 #print i, tsc 1.15 1.16 - if tsc < last_tsc[cpu]: 1.17 + if cpu >= len(last_tsc): 1.18 + last_tsc += [0] * (cpu - len(last_tsc) + 1) 1.19 + elif tsc < last_tsc[cpu]: 1.20 print "TSC stepped backward cpu %d ! %d %d" % (cpu,tsc,last_tsc[cpu]) 1.21 1.22 last_tsc[cpu] = tsc