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

Hal Finkel hfinkel at anl.gov
Tue Jul 22 13:45:32 PDT 2014


----- Original Message -----
> From: "Bill Schmidt" <wschmidt at linux.vnet.ibm.com>
> To: llvm-commits at cs.uiuc.edu
> Sent: Tuesday, July 22, 2014 3:41:57 PM
> 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?

Yes, go ahead.

 -Hal

> 
> 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
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-commits mailing list