From: "KUWAMURA Shin'ya" Subject: [PATCH] xentrace_format supports a system that has more than 8 CPUs Date: Fri, 19 May 2006 14:26:09 +0900 (JST) Message-ID: <20060519.142609.104059485.kuwa@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Fri_May_19_14_26_09_2006_716)--" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org ----Next_Part(Fri_May_19_14_26_09_2006_716)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 Thanks, -- KUWAMURA Shin'ya ----Next_Part(Fri_May_19_14_26_09_2006_716)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xentrace_format.patch" 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 ----Next_Part(Fri_May_19_14_26_09_2006_716)-- Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel ----Next_Part(Fri_May_19_14_26_09_2006_716)----