Mailing List Archive

Fix xentrace_format to deal with more than 16 CPUs.
# HG changeset patch
# User kaf24@firebug.cl.cam.ac.uk
# Node ID 167790b102ac48e6645882b0cf74ffdb60758f3c
# Parent a5ef851c217b5b0d3482b1802bee8b2b82392220
Fix xentrace_format to deal with more than 16 CPUs.
Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
---
tools/xentrace/xentrace_format | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)

diff -r a5ef851c217b -r 167790b102ac tools/xentrace/xentrace_format
--- a/tools/xentrace/xentrace_format Fri May 19 15:51:26 2006 +0100
+++ b/tools/xentrace/xentrace_format Fri May 19 15:52:35 2006 +0100
@@ -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-changelog mailing list
Xen-changelog@lists.xensource.com
http://lists.xensource.com/xen-changelog