| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 | 2 |
| 3 # Copyright 2010 The Native Client Authors. All rights reserved. | 3 # Copyright 2010 The Native Client Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can | 4 # Use of this source code is governed by a BSD-style license that can |
| 5 # be found in the LICENSE file. | 5 # be found in the LICENSE file. |
| 6 | 6 |
| 7 set -o nounset | 7 set -o nounset |
| 8 set -o errexit | 8 set -o errexit |
| 9 | 9 |
| 10 ###################################################################### | 10 ###################################################################### |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 SPEC2K_BENCHMARKS="${LIST_FP_C} ${LIST_INT_C} ${LIST_INT_CPP}" | 22 SPEC2K_BENCHMARKS="${LIST_FP_C} ${LIST_INT_C} ${LIST_INT_CPP}" |
| 23 | 23 |
| 24 # One of {./run.train.sh, ./run.ref.sh} | 24 # One of {./run.train.sh, ./run.ref.sh} |
| 25 SPEC2K_SCRIPT="./run.train.sh" | 25 SPEC2K_SCRIPT="./run.train.sh" |
| 26 | 26 |
| 27 # uncomment this to disable verification | 27 # uncomment this to disable verification |
| 28 # verification time will be part of overall benchmarking time | 28 # verification time will be part of overall benchmarking time |
| 29 # export VERIFY=no | 29 # export VERIFY=no |
| 30 export VERIFY=${VERIFY:-yes} | 30 export VERIFY=${VERIFY:-yes} |
| 31 | 31 export MAKEOPTS=${MAKEOPTS:-} |
| 32 export PERF_LOGGER="$(pwd)/emit_perf_log.sh" | 32 export PERF_LOGGER="$(pwd)/emit_perf_log.sh" |
| 33 | 33 |
| 34 # Pick a setup | |
| 35 | |
| 36 ###################################################################### | 34 ###################################################################### |
| 37 # Helper | 35 # Helper |
| 38 ###################################################################### | 36 ###################################################################### |
| 39 | 37 |
| 40 Banner() { | 38 Banner() { |
| 41 echo "######################################################################" | 39 echo "######################################################################" |
| 42 echo "$@" | 40 echo "$@" |
| 43 echo "######################################################################" | 41 echo "######################################################################" |
| 44 } | 42 } |
| 45 | 43 |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 timeit=$1 | 430 timeit=$1 |
| 433 "$2" | 431 "$2" |
| 434 shift 2 | 432 shift 2 |
| 435 | 433 |
| 436 local list=$(GetBenchmarkList "$@") | 434 local list=$(GetBenchmarkList "$@") |
| 437 ConfigInfo "$@" | 435 ConfigInfo "$@" |
| 438 for i in ${list} ; do | 436 for i in ${list} ; do |
| 439 Banner "Building: $i" | 437 Banner "Building: $i" |
| 440 cd $i | 438 cd $i |
| 441 | 439 |
| 442 make measureit=${timeit} PERF_LOGGER="${PERF_LOGGER}" ${i#*.}.${SUFFIX} | 440 make ${MAKEOPTS} measureit=${timeit} PERF_LOGGER="${PERF_LOGGER}" ${i#*.}.${
SUFFIX} |
| 443 cd .. | 441 cd .. |
| 444 done | 442 done |
| 445 } | 443 } |
| 446 | 444 |
| 447 | 445 |
| 448 #@ TimedRunCmd <time_result_file> {actual_cmd } | 446 #@ TimedRunCmd <time_result_file> {actual_cmd } |
| 449 #@ | 447 #@ |
| 450 #@ Run the command under time and dump time data to file. | 448 #@ Run the command under time and dump time data to file. |
| 451 TimedRunCmd() { | 449 TimedRunCmd() { |
| 452 target=$1 | 450 target=$1 |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 | 633 |
| 636 [ $# = 0 ] && set -- help # Avoid reference to undefined $1. | 634 [ $# = 0 ] && set -- help # Avoid reference to undefined $1. |
| 637 | 635 |
| 638 if [ "$(type -t $1)" != "function" ]; then | 636 if [ "$(type -t $1)" != "function" ]; then |
| 639 Usage | 637 Usage |
| 640 echo "ERROR: unknown mode '$1'." >&2 | 638 echo "ERROR: unknown mode '$1'." >&2 |
| 641 exit 1 | 639 exit 1 |
| 642 fi | 640 fi |
| 643 | 641 |
| 644 eval "$@" | 642 eval "$@" |
| OLD | NEW |