WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] xentrace_format supports a system that has more than

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] xentrace_format supports a system that has more than 8 CPUs
From: "KUWAMURA Shin'ya" <kuwa@xxxxxxxxxxxxxx>
Date: Fri, 19 May 2006 14:26:09 +0900 (JST)
Delivery-date: Thu, 18 May 2006 22:26:58 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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 <kuwa@xxxxxxxxxxxxxx>

Thanks,
-- KUWAMURA Shin'ya
diff -r d2f6e3d70f22 tools/xentrace/xentrace_format
--- a/tools/xentrace/xentrace_format    Wed May 17 16:31:46 2006 -0600
+++ b/tools/xentrace/xentrace_format    Fri May 19 11:42:51 2006 +0900
@@ -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
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] xentrace_format supports a system that has more than 8 CPUs, KUWAMURA Shin'ya <=