diff --git a/docs/src/changelog.md b/docs/src/changelog.md index 10ef126..3f3e5ae 100644 --- a/docs/src/changelog.md +++ b/docs/src/changelog.md @@ -2,12 +2,13 @@ ## Unreleased ### Added #### Base Configurations -- DaCapo 23.11-Chopin. Please use `dacapochopin_jep261` modifier when running this release with `callback` set due to JEP 261. +- DaCapo 23.11-Chopin available as `dacapochopin`. Please use `dacapochopin_jdk9`, `dacapochopin_jdk11`, `dacapochopin_jdk17`, and `dacapochopin_jdk21` modifiers for JDK 9, 11, 17, and 21 respectively. - Temurin 21 ### Changed #### Base Configurations - Environment variables are expanded when resolving paths of runtimes and benchmark suites. +- `--add-exports java.base/jdk.internal.ref=ALL-UNNAMED` is no longer automatically added when running DaCapo benchmarks on >= JDK 9. This approach doesn't scale now we have more workarounds specific to different JDK versions. This is also too opaque and not clear how it's implemented. New modifiers are introduced to address this issue. #### Modifiers - `EnvVar` `val` is expanded using the outside environment prior to benchmark execution. diff --git a/src/running/config/base/dacapo.yml b/src/running/config/base/dacapo.yml index 7e6efa7..729daa6 100644 --- a/src/running/config/base/dacapo.yml +++ b/src/running/config/base/dacapo.yml @@ -130,25 +130,77 @@ suites: timeout: 1800 modifiers: - dacapochopin_jep261: + dacapochopin_jdk21: type: ModifierSet - val: dacapochopin_jep261_h2o21|dacapochopin_jep261_cassandra21|dacapochopin_jep261_trades21 - dacapochopin_jep261_h2o21: + val: "dacapochopin_jdk17|dacapochopin_jdk21_h2o" + dacapochopin_jdk21_h2o: type: JVMArg - val: "-Dsys.ai.h2o.debug.allowJavaVersions=21 --add-opens java.base/java.lang=ALL-UNNAMED" + val: "-Dsys.ai.h2o.debug.allowJavaVersions=21" includes: dacapochopin: - h2o - dacapochopin_jep261_cassandra21: + dacapochopin_jdk17: + type: ModifierSet + val: "dacapochopin_jdk11|dacapochopin_jdk17_cassandra" + dacapochopin_jdk17_cassandra: + type: JVMArg + val: "-Djava.security.manager=allow" + includes: + dacapochopin: + - cassandra + dacapochopin_jdk11: + type: ModifierSet + val: "dacapochopin_jdk9" + dacapochopin_jdk9: + type: ModifierSet + val: "dacapochopin_jdk9_backward_compatible|dacapochopin_jdk9_h2o|dacapochopin_jdk9_cassandra|dacapochopin_jdk9_trades" + dacapochopin_jdk9_h2o: + type: JVMArg + val: "--add-opens java.base/java.lang=ALL-UNNAMED" + includes: + dacapochopin: + - h2o + dacapochopin_jdk9_cassandra: type: JVMArg - val: "-Djava.security.manager=allow --add-exports java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED" + val: "--add-exports java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED" includes: dacapochopin: - cassandra - dacapochopin_jep261_trades21: + dacapochopin_jdk9_trades: type: JVMArg val: "--add-opens java.base/java.util=ALL-UNNAMED" includes: dacapochopin: - tradebeans - tradesoap + # https://github.com/anupli/running-ng/issues/111 + # https://github.com/anupli/running-ng/pull/114 + # https://github.com/anupli/running-ng/issues/130 + # https://mmtk.zulipchat.com/#narrow/stream/262677-ANU-Research/topic/Using.20new.20dacapo/near/270150954 + dacapochopin_jdk9_backward_compatible: + type: JVMArg + val: "--add-exports java.base/jdk.internal.ref=ALL-UNNAMED" + includes: + dacapochopin: + - avrora + - batik + - biojava + - cassandra + - eclipse + - fop + - graphchi + - h2 + - h2o + - jme + - jython + - kafka + - luindex + - lusearch + - pmd + - spring + - sunflow + - tomcat + - tradebeans + - tradesoap + - xalan + - zxing \ No newline at end of file diff --git a/src/running/config/base/modifiers.yml b/src/running/config/base/modifiers.yml index 58f7c0c..a9d8d7f 100644 --- a/src/running/config/base/modifiers.yml +++ b/src/running/config/base/modifiers.yml @@ -5,14 +5,6 @@ modifiers: c2: type: JVMArg val: "-XX:-TieredCompilation -Xcomp" - excludes: - # These two benchmarks exit with code 1 - dacapochopin-29a657f: - - tradebeans - - tradesoap - dacapochopin-f480064: - - tradebeans - - tradesoap ms: type: JVMArg val: "-XX:MetaspaceSize=500M -XX:+DisableExplicitGC" diff --git a/src/running/suite.py b/src/running/suite.py index aec5661..68532aa 100644 --- a/src/running/suite.py +++ b/src/running/suite.py @@ -224,20 +224,6 @@ def get_benchmark(self, bm_spec: Union[str, Dict[str, Any]]) -> "JavaBenchmark": # Name of the benchmark program_args.append(bm_name) - # https://github.com/anupli/running-ng/issues/111 - # https://mmtk.zulipchat.com/#narrow/stream/262677-ANU-Research/topic/Using.20new.20dacapo/near/270150954 - def strategy(runtime: Runtime) -> Sequence[Modifier]: - modifiers = [] - if isinstance(runtime, OpenJDK): - if runtime.release >= 9: - modifiers.append( - JVMArg( - name="add_exports", - val="--add-exports java.base/jdk.internal.ref=ALL-UNNAMED", - ) - ) - return modifiers - return JavaBenchmark( jvm_args=[], program_args=program_args, @@ -247,7 +233,6 @@ def strategy(runtime: Runtime) -> Sequence[Modifier]: suite_name=self.name, name=name, timeout=timeout, - runtime_specific_modifiers_strategy=strategy, ) def get_minheap(self, bm: Benchmark) -> int: diff --git a/tests/test_suite.py b/tests/test_suite.py index 0105cd9..b4f2f20 100644 --- a/tests/test_suite.py +++ b/tests/test_suite.py @@ -76,48 +76,6 @@ def test_dacapo_timing_iteration(): assert "-converge" in fop_converge.to_string(DummyRuntime("java")) -def test_dacapo_openjdk_9_workaround(): - c = Configuration( - { - "suites": { - "dacapo2006": { - "type": "DaCapo", - "release": "2006", - "path": "/usr/share/benchmarks/dacapo/dacapo-2006-10-MR2.jar", - "timing_iteration": 3, - } - }, - "benchmarks": {"dacapo2006": ["fop"]}, - "runtimes": { - "jdk8": { - "type": "OpenJDK", - "release": 8, - "home": "/usr/lib/jvm/temurin-8-jdk-amd64", - }, - "jdk11": { - "type": "OpenJDK", - "release": 11, - "home": "/usr/lib/jvm/temurin-11-jdk-amd64", - }, - }, - "configs": ["jdk8", "jdk11"], - } - ) - c.resolve_class() - from running.benchmark import JavaBenchmark - - fop: JavaBenchmark - fop = c.get("benchmarks")["dacapo2006"][0] - jdk8 = c.get("runtimes")["jdk8"] - jdk11 = c.get("runtimes")["jdk11"] - fop_jdk8 = fop.attach_modifiers(fop.get_runtime_specific_modifiers(jdk8)) - fop_jdk11 = fop.attach_modifiers(fop.get_runtime_specific_modifiers(jdk11)) - print(fop_jdk8.to_string(jdk8)) - print(fop_jdk11.to_string(jdk11)) - assert "add-exports" not in fop_jdk8.to_string(jdk8) - assert "add-exports" in fop_jdk11.to_string(jdk11) - - def test_dacapo_path_ennvvar(): c = Configuration( {