diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2015-04-12 13:33:32 +0100 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2016-08-22 13:30:18 +0000 |
commit | b0e5f98263729a8565c2543490add36220064c91 (patch) | |
tree | 11732481c8d4739d546a6cb44ecae3dce88b7516 | |
parent | 4e33f9c178dc61498e50e193c6acc370753379c0 (diff) |
Work on bench-ilp32.sh
-rwxr-xr-x | bench-ilp32.sh | 71 | ||||
-rw-r--r-- | cpu2000.cfg | 6 | ||||
-rw-r--r-- | cpu2006.cfg | 3 | ||||
-rw-r--r-- | cpu2xxx.cfg | 13 | ||||
-rwxr-xr-x | spec2xxx-prepare | 20 |
5 files changed, 87 insertions, 26 deletions
diff --git a/bench-ilp32.sh b/bench-ilp32.sh index 93f9504..4cd6f92 100755 --- a/bench-ilp32.sh +++ b/bench-ilp32.sh @@ -7,11 +7,12 @@ build_toolchain() local top="$1" local abi="$2" - if [ x"$abi" != x"aarch32" ]; then - target="--target aarch64-$abi-linux-gnu --set abi=$abi" - else - target="--target arm-$abi-linux-gnueabihf" - fi + case "$abi" in + lp64|ilp32) target="--target aarch64-$abi-linux-gnu --set abi=$abi" ;; + aarch32) target="--target arm-$abi-linux-gnueabihf" ;; + pc32) target="--target i686-$abi-linux-gnu" ;; + pc64) target="--target x86_64-$abi-linux-gnu" ;; + esac git clone http://git.linaro.org/toolchain/abe.git $top pushd $top @@ -27,11 +28,12 @@ download_toolchain() local abi="$2" local build - if [ x"$abi" != x"aarch32" ]; then - build=gcc-linaro-4.9~git82c1251-aarch64_aarch64-$abi-linux-gnu-20150310 - else - build=gcc-linaro-4.9~git82c1251-aarch64_arm-$abi-linux-gnueabihf-20150319 - fi + case "$abi" in + lp64|ilp32) build=gcc-linaro-4.9~git82c1251-aarch64_aarch64-$abi-linux-gnu-20150310 ;; + aarch32) build=gcc-linaro-4.9~git82c1251-aarch64_arm-$abi-linux-gnueabihf-20150319 ;; + pc32) build=gcc-linaro-4.9~git82c1251-aarch64_i686-$abi-linux-gnu-20150319 ;; + pc64) build=gcc-linaro-4.9~git82c1251-aarch64_x86_64-$abi-linux-gnu-20150319 ;; + esac wget -q -c -O $build.tar.xz http://people.linaro.org/~maxim.kuvyrkov/bench-ilp32/$build.tar.xz tar xf $build.tar.xz @@ -49,11 +51,12 @@ print_abe_sysroot() case "$get_toolchain" in "build_toolchain") - if [ x"$abi" != x"aarch32" ]; then - echo "$top/sysroots/aarch64-$abi-linux-gnu" - else - echo "$top/sysroots/arm-$abi-linux-gnueabihf" - fi + case "$abi" in + lp64|ilp32) echo "$top/sysroots/aarch64-$abi-linux-gnu" ;; + aarch32) echo "$top/sysroots/arm-$abi-linux-gnueabihf" ;; + pc32) echo "$top/sysroots/i686-$abi-linux-gnu" ;; + pc64) echo "$top/sysroots/x86_64-$abi-linux-gnu" ;; + esac ;; "download_toolchain") echo "$top/libc" ;; @@ -86,9 +89,14 @@ print_abe_bin() esac } -abis=(aarch32) +#specs=(cpu2000 cpu2006) specs=(cpu2006) -exts=(O2) +abis=(lp64 ilp32 aarch32) +#exts=(O2 O3 Os Ofast) +exts=(Ofast O2) + +start_at="cpu2000-aarch32-Ofast" +skip=false #get_toolchain=build_toolchain get_toolchain=download_toolchain @@ -153,16 +161,37 @@ for spec in "${specs[@]}"; do ldso="$abe_sysroot/lib/ld-linux-armhf.so.3" rpath="$abe_sysroot/lib:$abe_sysroot/usr/lib" ;; - esac + "pc32") + prefix="$abe_bin/i686-$i-linux-gnu-" + mcpu="" + ldso="$abe_sysroot/lib/ld-linux.so.2" + rpath="$abe_sysroot/lib:$abe_sysroot/usr/lib" + ;; + "pc64") + prefix="$abe_bin/x86_64-$i-linux-gnu-" + mcpu="" + ldso="$abe_sysroot/lib/ld-linux.so.2" + rpath="$abe_sysroot/lib64:$abe_sysroot/usr/lib64" + ;; + esac export CONFIG=$i ./spec2xxx-prepare "$prefix" "$mcpu -Wl,-dynamic-linker=$ldso -Wl,-rpath=$rpath" - if [ x"$i" != x"lp64" ]; then - sed -i -e "s/-DSPEC_CPU2000_LP64//g" -e "s/-DSPEC_CPU_LP64//g" "$SPEC/config/$i.cfg" - fi + case "$i" in + lp64|pc64) ;; + ilp32|aarch32|pc32) + sed -i -e "s/-DSPEC_CPU2000_LP64//g" -e "s/-DSPEC_CPU_LP64//g" "$SPEC/config/$i.cfg" + ;; + esac for ext in "${exts[@]}"; do + if [ x"$spec-$i-$ext" = x"$start_at" ]; then + skip=false + elif $skip; then + continue + fi + ./spec2xxx-build -e $ext ./spec2xxx-run -e $ext diff --git a/cpu2000.cfg b/cpu2000.cfg index 84236c1..b9c5d6e 100644 --- a/cpu2000.cfg +++ b/cpu2000.cfg @@ -5,6 +5,8 @@ company_name = Linaro tester_name = Linaro +submit = @TASKSET@ + ################################################################ # Benchmark noise handling (via number of iterations) ################################################################ @@ -56,3 +58,7 @@ makeflags = # facerec won't build in parallel 187.facerec=default=default=default: makeflags = + +# fma3d won't build in parallel +191.fma3d=default=default=default: +makeflags = diff --git a/cpu2006.cfg b/cpu2006.cfg index c40b070..a001b96 100644 --- a/cpu2006.cfg +++ b/cpu2006.cfg @@ -5,6 +5,9 @@ test_sponsor = Linaro tester = Linaro +bind = @BIND@ +submit = @SUBMIT@ + ################################################################ # Benchmark noise handling (via number of iterations) ################################################################ diff --git a/cpu2xxx.cfg b/cpu2xxx.cfg index 3285d13..1ebb8fe 100644 --- a/cpu2xxx.cfg +++ b/cpu2xxx.cfg @@ -25,7 +25,6 @@ runlist = int fp teeout = yes teerunout = yes makeflags = -j@PARALLELIZE@ -submit = @SUBMIT@ use_submit_for_speed = 1 iterations = @ITERATIONS@ @@ -58,6 +57,18 @@ CXXOPTIMIZE = -O3 -fno-common @MCPU@ @MFPU@ @OPTIMIZE@ FOPTIMIZE = -O3 -fno-common @MCPU@ @MFPU@ @OPTIMIZE@ F77OPTIMIZE = -O3 -fno-common @MCPU@ @MFPU@ @OPTIMIZE@ +default=default=Ofast=default: +COPTIMIZE = -Ofast -funroll-loops -fno-common @MCPU@ @MFPU@ @OPTIMIZE@ +CXXOPTIMIZE = -Ofast -funroll-loops -fno-common @MCPU@ @MFPU@ @OPTIMIZE@ +FOPTIMIZE = -Ofast -funroll-loops -fno-common @MCPU@ @MFPU@ @OPTIMIZE@ +F77OPTIMIZE = -Ofast -funroll-loops -fno-common @MCPU@ @MFPU@ @OPTIMIZE@ + +default=default=Os=default: +COPTIMIZE = -Os -fno-common @MCPU@ @MFPU@ @OPTIMIZE@ +CXXOPTIMIZE = -Os -fno-common @MCPU@ @MFPU@ @OPTIMIZE@ +FOPTIMIZE = -Os -fno-common @MCPU@ @MFPU@ @OPTIMIZE@ +F77OPTIMIZE = -Os -fno-common @MCPU@ @MFPU@ @OPTIMIZE@ + default=peak=default=default: PASS1_CFLAGS = -fprofile-generate=@PROFILEDIR@/$(BENCHMARK) PASS1_CXXFLAGS = -fprofile-generate=@PROFILEDIR@/$(BENCHMARK) diff --git a/spec2xxx-prepare b/spec2xxx-prepare index 491422b..1f6fa22 100755 --- a/spec2xxx-prepare +++ b/spec2xxx-prepare @@ -73,8 +73,18 @@ esac case "$arch" in "aarch64") case "$optimize" in - *"cortex-a53"*) taskset_cpu="1" ;; - *) taskset_cpu="4" ;; + *"-mcpu=cortex-a57.cortex-a53"*) + bind_cpu="1,2,3,0,4,5,4,5" + taskset_cpu="1" + ;; + *"-mcpu=cortex-a53"*) + bind_cpu="1,2,3,0" + taskset_cpu="1" + ;; + *"-mcpu=cortex-a53") + bind_cpu="4,5" + taskset_cpu="4" + ;; esac ;; *) taskset_cpu="1" ;; @@ -96,7 +106,9 @@ cat $cfg_tmpl | sed \ -e "s#@SW_OS@#$sw_os#g" \ -e "s#@SW_COMPILER@#$sw_compiler#g" \ -e "s#@PARALLELIZE@#$(getconf _NPROCESSORS_ONLN)#g" \ - -e "s#@SUBMIT@#taskset -c $taskset_cpu \$command#g" \ + -e "s#@BIND@#$bind_cpu#g" \ + -e "s#@SUBMIT@#taskset -c \$BIND \$command#g" \ + -e "s#@TASKSET@#taskset -c $taskset_cpu \$command#g" \ -e "s#@ITERATIONS@#$iterations#g" \ -e "s#@ITERATIONS_2@#$(($iterations+2))#g" \ -e "s#@ITERATIONS_4@#$(($iterations+4))#g" \ @@ -106,7 +118,7 @@ cat $cfg_tmpl | sed \ -e "s#@OPTIMIZE@#$optimize#g" \ -e "s#@MCPU@#$mcpu#g" \ -e "s#@MFPU@#$mfpu#g" \ - -e "s#@PROFILEDIR@#$spec#g" \ + -e "s#@PROFILEDIR@#$spec/profile#g" \ -e "s#@DSPEC_CPU2000_LP64@#$spec_cpu2000_lp64#g" \ -e "s#@DSPEC_CPU_LP64@#$spec_cpu_lp64#g" \ > $spec/config/$config.tmp |