FW: [PATCH][test-suite] Use ctimeit rather than perf for PowerPC

James Molloy mankeyrabbit at gmail.com
Tue Jul 22 14:01:22 PDT 2014


Adding Yi for his input.

-----Original Message-----
From: "Bill Schmidt" <wschmidt at linux.vnet.ibm.com>
Sent: ‎22/‎07/‎2014 21:45
To: "llvm-commits at cs.uiuc.edu" <llvm-commits at cs.uiuc.edu>
Subject: [PATCH][test-suite] Use ctimeit rather than perf for PowerPC

[PATCH][test-suite] Use ctimeit rather than perf for PowerPC

A relatively recent patch (r209797) changed RunSafely.sh to use the timeit.sh
script, which uses perf when available in preference to ctimeit.  This causes
problems on some older PowerPC distros, where perf has been notoriously
buggy.  As a result, the entire test suite appears to fail.  There
occasionally appears to be some flaky behavior from perf on newer distros as
well which is less well-understood, but again results in phantom failures.
IBM has recommended use of operf and ocount for a while in preference to perf.

Therefore we'd like to opt out of using perf on PowerPC in this script, even
when perf is available.  As with targets where perf is unavailable, we would
like to fall back to ctimeit instead.  This patch checks "uname -m" for ppc64
or ppc64le to do just that.

Is this ok to commit?

Thanks,
Bill


Index: tools/timeit.sh
===================================================================
--- tools/timeit.sh	(revision 213677)
+++ tools/timeit.sh	(working copy)
@@ -1,6 +1,14 @@
 #! /bin/bash
 # A wrapper over perf to provide similar functionality to timeit.c
 
+# Fall back to ctimeit for PowerPC
+TARGET=`uname -m`
+
+if [ \( $TARGET = "ppc64" \) -o \( $TARGET = "ppc64le" \) ]; then
+    $(dirname $0)/ctimeit $@
+    exit $?
+fi
+
 DEPENDS="perf"
 
 # Fallback to ctimeit if dependencies are not met


_______________________________________________
llvm-commits mailing list
llvm-commits at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140722/dae4e74e/attachment.html>


More information about the llvm-commits mailing list