diff --git a/benchmarks/run-comparison.sh b/benchmarks/run-comparison.sh index 47646c6a..880e78c8 100755 --- a/benchmarks/run-comparison.sh +++ b/benchmarks/run-comparison.sh @@ -218,9 +218,12 @@ run_contestant() { local outfile="$TMPDIR/${label}_run${run}.txt" echo -n " $label run $run/$RUNS... " - if timeout "$TIMEOUT_SEC" "$@" > "$outfile" 2>&1; then - local total - total=$(grep "Total Time:" "$outfile" | grep -o '[0-9]*' || echo "999999999") + timeout "$TIMEOUT_SEC" "$@" > "$outfile" 2>&1 & + wait $! 2>/dev/null || true + + local total + total=$(grep "Total Time:" "$outfile" | grep -o '[0-9]*' || echo "") + if [ -n "$total" ] && [ "$total" -gt 0 ] 2>/dev/null; then echo "${total} ms" if [ "$total" -lt "$best_total" ]; then best_total=$total @@ -280,6 +283,12 @@ fi if [ "$HAVE_EMU" -eq 1 ]; then EMUROOT="-r$ROOT" + # The emulator doesn't exit after running a dis file, so use a shorter + # timeout. The benchmark completes in well under 60s; timeout then kills + # the lingering emulator process. + SAVED_TIMEOUT=$TIMEOUT_SEC + TIMEOUT_SEC=60 + run_contestant "Limbo_JIT" "$EMU" "$EMUROOT" -c1 dis/jitbench.dis JIT_FILE=$BEST_FILE echo "" @@ -287,6 +296,8 @@ if [ "$HAVE_EMU" -eq 1 ]; then run_contestant "Limbo_Interp" "$EMU" "$EMUROOT" -c0 dis/jitbench.dis INTERP_FILE=$BEST_FILE echo "" + + TIMEOUT_SEC=$SAVED_TIMEOUT fi # --- Parse best-run results into per-contestant files --- diff --git a/dis/9660srv.dis b/dis/9660srv.dis index f10cd623..17da28a0 100644 Binary files a/dis/9660srv.dis and b/dis/9660srv.dis differ diff --git a/dis/calc.dis b/dis/calc.dis index ab7b3bc8..0faa30bf 100644 Binary files a/dis/calc.dis and b/dis/calc.dis differ diff --git a/dis/disdep.dis b/dis/disdep.dis index 2f42deec..879b7a04 100644 Binary files a/dis/disdep.dis and b/dis/disdep.dis differ diff --git a/dis/emuinit.dis b/dis/emuinit.dis index 7577501f..00388786 100644 Binary files a/dis/emuinit.dis and b/dis/emuinit.dis differ diff --git a/dis/fc.dis b/dis/fc.dis index 3dabbbeb..a126ef34 100644 Binary files a/dis/fc.dis and b/dis/fc.dis differ diff --git a/dis/gzip.dis b/dis/gzip.dis index 18f1cb31..64165196 100644 Binary files a/dis/gzip.dis and b/dis/gzip.dis differ diff --git a/dis/iostats.dis b/dis/iostats.dis index 997a573e..52939c4f 100644 Binary files a/dis/iostats.dis and b/dis/iostats.dis differ diff --git a/dis/jitbench.dis b/dis/jitbench.dis index 6b967184..7cc72235 100644 Binary files a/dis/jitbench.dis and b/dis/jitbench.dis differ diff --git a/dis/jitbench2.dis b/dis/jitbench2.dis index 3d303d77..e69a6e90 100644 Binary files a/dis/jitbench2.dis and b/dis/jitbench2.dis differ diff --git a/dis/jitbug.dis b/dis/jitbug.dis new file mode 100644 index 00000000..204c5090 Binary files /dev/null and b/dis/jitbug.dis differ diff --git a/dis/jitbug2.dis b/dis/jitbug2.dis new file mode 100644 index 00000000..9f832347 Binary files /dev/null and b/dis/jitbug2.dis differ diff --git a/dis/jitshift.dis b/dis/jitshift.dis new file mode 100644 index 00000000..bdce59f7 Binary files /dev/null and b/dis/jitshift.dis differ diff --git a/dis/jittest.dis b/dis/jittest.dis new file mode 100644 index 00000000..0a81b330 Binary files /dev/null and b/dis/jittest.dis differ diff --git a/dis/js.dis b/dis/js.dis index 13b49c47..2db679bc 100644 Binary files a/dis/js.dis and b/dis/js.dis differ diff --git a/dis/lib/bufio.dis b/dis/lib/bufio.dis index f95f7e71..1c7ad995 100644 Binary files a/dis/lib/bufio.dis and b/dis/lib/bufio.dis differ diff --git a/dis/lib/login.dis b/dis/lib/login.dis index 48e271b6..9c24d069 100644 Binary files a/dis/lib/login.dis and b/dis/lib/login.dis differ diff --git a/dis/lib/menuhit.dis b/dis/lib/menuhit.dis index 49d543d2..a254aa82 100644 Binary files a/dis/lib/menuhit.dis and b/dis/lib/menuhit.dis differ diff --git a/dis/lib/midi.dis b/dis/lib/midi.dis index 668e1ab3..7a73be21 100644 Binary files a/dis/lib/midi.dis and b/dis/lib/midi.dis differ diff --git a/dis/lib/parseman.dis b/dis/lib/parseman.dis index 3efcc80c..7cb72718 100644 Binary files a/dis/lib/parseman.dis and b/dis/lib/parseman.dis differ diff --git a/dis/lib/profile.dis b/dis/lib/profile.dis index 12eca35d..801721d0 100644 Binary files a/dis/lib/profile.dis and b/dis/lib/profile.dis differ diff --git a/dis/lib/readjpg.dis b/dis/lib/readjpg.dis index a6f9e163..4a149129 100644 Binary files a/dis/lib/readjpg.dis and b/dis/lib/readjpg.dis differ diff --git a/dis/lib/string.dis b/dis/lib/string.dis index 4ce3763e..25657c8b 100644 Binary files a/dis/lib/string.dis and b/dis/lib/string.dis differ diff --git a/dis/lib/testing.dis b/dis/lib/testing.dis index 51157b0b..80727550 100644 Binary files a/dis/lib/testing.dis and b/dis/lib/testing.dis differ diff --git a/dis/lib/tkclient.dis b/dis/lib/tkclient.dis index 098b00e8..14b1c242 100644 Binary files a/dis/lib/tkclient.dis and b/dis/lib/tkclient.dis differ diff --git a/dis/lib/wmclient.dis b/dis/lib/wmclient.dis index 50933e3b..c34eb113 100644 Binary files a/dis/lib/wmclient.dis and b/dis/lib/wmclient.dis differ diff --git a/dis/lib/wmlib.dis b/dis/lib/wmlib.dis index 9d57b733..be64f994 100644 Binary files a/dis/lib/wmlib.dis and b/dis/lib/wmlib.dis differ diff --git a/dis/lib/xml.dis b/dis/lib/xml.dis index fb4cd0f8..b8e2c00d 100644 Binary files a/dis/lib/xml.dis and b/dis/lib/xml.dis differ diff --git a/dis/man2html.dis b/dis/man2html.dis index d5f3749b..5137a345 100644 Binary files a/dis/man2html.dis and b/dis/man2html.dis differ diff --git a/dis/seq.dis b/dis/seq.dis index dd2eb8d7..20da7c0f 100644 Binary files a/dis/seq.dis and b/dis/seq.dis differ diff --git a/dis/test9p.dis b/dis/test9p.dis new file mode 100644 index 00000000..8fa7d7ff Binary files /dev/null and b/dis/test9p.dis differ diff --git a/dis/time.dis b/dis/time.dis index 190c76bc..dce101f1 100644 Binary files a/dis/time.dis and b/dis/time.dis differ diff --git a/dis/units.dis b/dis/units.dis index f5a3e3fa..93fb6056 100644 Binary files a/dis/units.dis and b/dis/units.dis differ diff --git a/utils/mk/mk b/utils/mk/mk new file mode 100755 index 00000000..e8765e7b Binary files /dev/null and b/utils/mk/mk differ