From: kaf24@firebug.cl.cam.ac.uk Date: Fri, 19 May 2006 14:52:35 +0000 (+0100) Subject: Fix xentrace_format to deal with more than 16 CPUs. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16047^2~25 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e1b53df502092ecbb66e4678c1d81dd9cbcc9404;p=xen.git Fix xentrace_format to deal with more than 16 CPUs. Signed-off-by: KUWAMURA Shin'ya --- 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