@@ -34,7 +34,7 @@ print_help () {
34 echo " [--with-compiler <compiler exe name>]"
34 echo " [--with-compiler <compiler exe name>]"
35 echo " [--cabal-build-options <options>]"
35 echo " [--cabal-build-options <options>]"
36 echo " [--rtsopts <opts>]"
36 echo " [--rtsopts <opts>]"
37− echo " [--commit-compare] [--base <commit>] [--candidate <commit>]"
37+ #echo " [--commit-compare] [--base <commit>] [--candidate <commit>]"
38 #echo " -- <gauge options or benchmarks>"
38 #echo " -- <gauge options or benchmarks>"
40 echo "--benchmarks: benchmarks to run, use 'help' for list of benchmarks"
40 echo "--benchmarks: benchmarks to run, use 'help' for list of benchmarks"
@@ -56,10 +56,10 @@ print_help () {
56 echo "bench.sh --benchmarks Data.Parser -- Data.Parser/o-1-space "
56 echo "bench.sh --benchmarks Data.Parser -- Data.Parser/o-1-space "
57 echo "restricts Heap/Stack space for O(1) characterstics"
57 echo "restricts Heap/Stack space for O(1) characterstics"
59− echo "When using --commit-compare, by default comparative chart of HEAD^ vs HEAD"
59+ #echo "When using --commit-compare, by default comparative chart of HEAD^ vs HEAD"
60− echo "commit is generated, in the 'charts' directory."
60+ #echo "commit is generated, in the 'charts' directory."
61− echo "Use --base and --candidate to select the commits to compare."
61+ #echo "Use --base and --candidate to select the commits to compare."
63 #echo "Any arguments after a '--' are passed directly to gauge"
63 #echo "Any arguments after a '--' are passed directly to gauge"
@@ -383,16 +383,20 @@ run_benches_comparing() {
384 echo "Comparing baseline commit [$BASE] with candidate [$CANDIDATE]"
384 echo "Comparing baseline commit [$BASE] with candidate [$CANDIDATE]"
385 echo "Checking out base commit [$BASE] for benchmarking"
385 echo "Checking out base commit [$BASE] for benchmarking"
386+ # XXX git checkout will overwrite this script itself and the scripts
387+ # imported/used by this script.
386 git checkout "$BASE" || die "Checkout of base commit [$BASE] failed"
388 git checkout "$BASE" || die "Checkout of base commit [$BASE] failed"
388− $BUILD_BENCH || die "build failed"
390+ # $BUILD_BENCH || die "build failed"
391+ run_build "$BUILD_BENCH" $BENCHMARK_PACKAGE_NAME bench "$TARGETS"
389 run_bench_targets $BENCHMARK_PACKAGE_NAME b "$bench_list" target_exe_extra_args
392 run_bench_targets $BENCHMARK_PACKAGE_NAME b "$bench_list" target_exe_extra_args
391 echo "Checking out candidate commit [$CANDIDATE] for benchmarking"
394 echo "Checking out candidate commit [$CANDIDATE] for benchmarking"
392 git checkout "$CANDIDATE" || \
395 git checkout "$CANDIDATE" || \
393 die "Checkout of candidate [$CANDIDATE] commit failed"
396 die "Checkout of candidate [$CANDIDATE] commit failed"
395− $BUILD_BENCH || die "build failed"
398+ # $BUILD_BENCH || die "build failed"
399+ run_build "$BUILD_BENCH" $BENCHMARK_PACKAGE_NAME bench "$TARGETS"
396 run_bench_targets $BENCHMARK_PACKAGE_NAME b "$bench_list" target_exe_extra_args
400 run_bench_targets $BENCHMARK_PACKAGE_NAME b "$bench_list" target_exe_extra_args
397 # XXX reset back to the original commit
401 # XXX reset back to the original commit
@@ -417,6 +421,7 @@ run_measurements() {
418 if test "$COMMIT_COMPARE" = "0"
422 if test "$COMMIT_COMPARE" = "0"
424+ run_build "$BUILD_BENCH" $BENCHMARK_PACKAGE_NAME bench "$TARGETS"
420 run_bench_targets $BENCHMARK_PACKAGE_NAME b "$bench_list" target_exe_extra_args
425 run_bench_targets $BENCHMARK_PACKAGE_NAME b "$bench_list" target_exe_extra_args
422 run_benches_comparing "$bench_list"
427 run_benches_comparing "$bench_list"
@@ -613,7 +618,6 @@ fi
613BUILD_BENCH="$CABAL_EXECUTABLE v2-build $BUILD_FLAGS $CABAL_BUILD_OPTIONS --enable-benchmarks"
618BUILD_BENCH="$CABAL_EXECUTABLE v2-build $BUILD_FLAGS $CABAL_BUILD_OPTIONS --enable-benchmarks"
614if test "$MEASURE" = "1"
619if test "$MEASURE" = "1"
616− run_build "$BUILD_BENCH" $BENCHMARK_PACKAGE_NAME bench "$TARGETS"
617 run_measurements "$TARGETS"
621 run_measurements "$TARGETS"