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

Bill Schmidt wschmidt at linux.vnet.ibm.com
Tue Jul 22 13:53:54 PDT 2014


Author: wschmidt
Date: Tue Jul 22 15:53:54 2014
New Revision: 213683

URL: http://llvm.org/viewvc/llvm-project?rev=213683&view=rev
Log:
[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.


Modified:
    test-suite/trunk/tools/timeit.sh

Modified: test-suite/trunk/tools/timeit.sh
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/tools/timeit.sh?rev=213683&r1=213682&r2=213683&view=diff
==============================================================================
--- test-suite/trunk/tools/timeit.sh (original)
+++ test-suite/trunk/tools/timeit.sh Tue Jul 22 15:53:54 2014
@@ -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





More information about the llvm-commits mailing list