diff options
Diffstat (limited to 'tests/bench/bench.sh')
| -rw-r--r-- | tests/bench/bench.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/bench/bench.sh b/tests/bench/bench.sh index ab6b07d..65f455e 100644 --- a/tests/bench/bench.sh +++ b/tests/bench/bench.sh @@ -2,13 +2,15 @@ # o3 against plain code: each kernel in tests/programs/bench.zc on each backend, with # the time to start up and compile (the 'z' run) taken off. needs bc. cd "$(dirname "$0")/../.."; T=$(mktemp -d); trap 'rm -rf $T' EXIT -gcc -O2 -w -DJTYPE=int src/core/core.c src/core/io_linux.c -Isrc/core -o $T/zy +CC=${CC:-$(sh src/tools/findcc.sh)} || exit 1 +make -s build/core/genome.bin || exit 1 +$CC -O2 -w -DJTYPE=int src/core/core.c src/core/io_linux.c -Isrc/core -Ibuild/core/map --embed-dir=build/core -o $T/zy vms=("$T/zy"); names=("interp") if command -v llvm-config >/dev/null; then - gcc -O2 -w -DJTYPE=int -DZYLLVM $(llvm-config --cflags) src/core/core.c src/core/io_linux.c -Isrc/core -o $T/zyl $(llvm-config --ldflags --libs) && { vms+=("$T/zyl"); names+=("llvm"); } + $CC -O2 -w -DJTYPE=int -DZYLLVM $(llvm-config --cflags) src/core/core.c src/core/io_linux.c -Isrc/core -Ibuild/core/map --embed-dir=build/core -o $T/zyl $(llvm-config --ldflags --libs) && { vms+=("$T/zyl"); names+=("llvm"); } fi if command -v aarch64-linux-gnu-gcc >/dev/null && command -v qemu-aarch64 >/dev/null; then - aarch64-linux-gnu-gcc -O2 -w -DJTYPE=int -static src/core/core.c src/core/io_linux.c -Isrc/core -o $T/zyj && { vms+=("qemu-aarch64 $T/zyj"); names+=("arm64 (qemu)"); } + aarch64-linux-gnu-gcc -O2 -w -DJTYPE=int -static src/core/core.c src/core/io_linux.c -Isrc/core -Ibuild/core/map --embed-dir=build/core -o $T/zyj && { vms+=("qemu-aarch64 $T/zyj"); names+=("arm64 (qemu)"); } fi # seconds per run of kernel $2 on vm $1: the slope between $3 runs and 1 run, # best of three each, so starting up and compiling cancel out |
