Skip to content

Commit da5502b

Browse files
committed
[GR-63249] Defaults dacapo gate to older smaller release.
PullRequest: graal/20338
2 parents 35778b7 + a84dc23 commit da5502b

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

compiler/mx.compiler/mx_compiler.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,8 @@ def _compiler_error_options(default_compilation_failure_action='ExitVM', vmargs=
420420
res.append(prefix + 'ShowDumpFiles=true')
421421
return res
422422

423-
def _gate_dacapo(name, iterations, extraVMarguments=None, force_serial_gc=True, threads=None):
423+
def _gate_dacapo(name, iterations, extraVMarguments=None, force_serial_gc=True, threads=None, suite_version="9.12-MR1-git+2baec49"):
424+
# by default, it uses a version of the DaCapo suite archive that is reasonably-sized for gating
424425
if iterations == -1:
425426
return
426427
vmargs = ['-XX:+UseSerialGC'] if force_serial_gc else []
@@ -437,7 +438,7 @@ def _gate_dacapo(name, iterations, extraVMarguments=None, force_serial_gc=True,
437438

438439
# catch `*-report.txt` if the benchmark fails
439440
try:
440-
return _run_benchmark('dacapo', name, args, vmargs)
441+
return _run_benchmark('dacapo', name, args, vmargs, suite_version=suite_version)
441442
except BaseException as e:
442443
file = os.path.join(scratch_dir, f"{name}-report.txt")
443444
# not all benchmarks produce a report file
@@ -465,14 +466,16 @@ def _gate_renaissance(name, iterations, extraVMarguments=None):
465466
return _run_benchmark('renaissance', name, args, vmargs)
466467

467468

468-
def _run_benchmark(suite, name, args, vmargs):
469+
def _run_benchmark(suite, name, args, vmargs, suite_version=None):
469470
if not [vmarg for vmarg in vmargs if vmarg.startswith('-Xmx')]:
470471
vmargs += ['-Xmx8g']
471472
out = mx.TeeOutputCapture(mx.OutputCapture())
472-
exit_code, suite, results = mx_benchmark.gate_mx_benchmark(["{}:{}".format(suite, name), "--tracker=none", "--"] + vmargs + ["--"] + args, out=out, err=out, nonZeroIsFatal=False)
473+
suite_version_arg = ["--bench-suite-version", str(suite_version)] if suite_version else []
474+
exit_code, suite, results = mx_benchmark.gate_mx_benchmark(["{}:{}".format(suite, name)] + suite_version_arg + [ "--tracker=none", "--"] + vmargs + ["--"] + args, out=out, err=out, nonZeroIsFatal=False)
473475
if exit_code != 0:
474476
mx.log(out)
475-
mx.abort("Gate for {} benchmark '{}' failed!".format(suite, name))
477+
suite_str = f"{suite} (version={suite_version})" if suite_version else suite
478+
mx.abort("Gate for {} benchmark '{}' failed!".format(suite_str, name))
476479
return exit_code, suite, results
477480

478481
def _check_forbidden_imports(projects, package_substrings, exceptions=None):

0 commit comments

Comments
 (0)