From de485de241b5dd1a874e028fc48f5c324d1cbb78 Mon Sep 17 00:00:00 2001 From: Fengyun Liu Date: Mon, 6 Nov 2023 15:24:36 +0100 Subject: [PATCH 01/11] Add SpecJVM2008 native image benchmarks Co-authored-by: Francois Farquet --- .../mx.substratevm/mx_substratevm_benchmark.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/substratevm/mx.substratevm/mx_substratevm_benchmark.py b/substratevm/mx.substratevm/mx_substratevm_benchmark.py index c00124b38943..9d57732e5ef4 100644 --- a/substratevm/mx.substratevm/mx_substratevm_benchmark.py +++ b/substratevm/mx.substratevm/mx_substratevm_benchmark.py @@ -644,8 +644,22 @@ def createCommandLineArgs(self, benchmarks, bmSuiteArgs): self.benchmark_name = benchmarks[0] return args + @staticmethod + def short_run_args(): + return ["-wt", "1", "-it", "5"] + + def extra_agent_run_arg(self, benchmark, args, image_run_args): + return super(SpecJVM2008NativeImageBenchmarkSuite, self).extra_agent_run_arg(benchmark, args, image_run_args) + self.short_run_args() + ["-ikv"] + + def extra_profile_run_arg(self, benchmark, args, image_run_args, should_strip_run_args): + return super(SpecJVM2008NativeImageBenchmarkSuite, self).extra_profile_run_arg(benchmark, args, image_run_args, should_strip_run_args) + self.short_run_args() + ["-ikv"] + def extra_image_build_argument(self, benchmark, args): - return super(SpecJVM2008NativeImageBenchmarkSuite, self).extra_image_build_argument(benchmark, args) + mx_sdk_vm_impl.svm_experimental_options(['-H:-ParseRuntimeOptions']) + ['-Djava.awt.headless=false'] + return super(SpecJVM2008NativeImageBenchmarkSuite, self).extra_image_build_argument(benchmark, args) + mx_sdk_vm_impl.svm_experimental_options(['-H:-ParseRuntimeOptions']) + def extra_run_arg(self, benchmark, args, image_run_args): + # disables formatted report generation since chart generation with JFreeChart loads fonts from disk (from java.home) to compute string width + disable_rendered_report = ["-ctf", "false", "-chf", "false"] + return super(SpecJVM2008NativeImageBenchmarkSuite, self).extra_run_arg(benchmark, args, image_run_args) + disable_rendered_report + ["-ikv", "-wt", "5", "-it", "15"] mx_benchmark.add_bm_suite(SpecJVM2008NativeImageBenchmarkSuite()) From 8d30e8bb6c83b3a6326356ac6fffee9c9eaae18e Mon Sep 17 00:00:00 2001 From: Fengyun Liu Date: Thu, 9 Nov 2023 10:32:30 +0100 Subject: [PATCH 02/11] Fix success patterns for agent stages --- .../mx.substratevm/mx_substratevm_benchmark.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/substratevm/mx.substratevm/mx_substratevm_benchmark.py b/substratevm/mx.substratevm/mx_substratevm_benchmark.py index 9d57732e5ef4..a9fcad4d7fc0 100644 --- a/substratevm/mx.substratevm/mx_substratevm_benchmark.py +++ b/substratevm/mx.substratevm/mx_substratevm_benchmark.py @@ -635,7 +635,7 @@ def benchSuiteName(self, bmSuiteArgs=None): return 'specjvm2008' def createCommandLineArgs(self, benchmarks, bmSuiteArgs): - args = super(SpecJVM2008NativeImageBenchmarkSuite, self).createCommandLineArgs(benchmarks, bmSuiteArgs) + args = super().createCommandLineArgs(benchmarks, bmSuiteArgs) if benchmarks is None: mx.abort("Suite can only run a single benchmark per VM instance.") elif len(benchmarks) != 1: @@ -649,17 +649,20 @@ def short_run_args(): return ["-wt", "1", "-it", "5"] def extra_agent_run_arg(self, benchmark, args, image_run_args): - return super(SpecJVM2008NativeImageBenchmarkSuite, self).extra_agent_run_arg(benchmark, args, image_run_args) + self.short_run_args() + ["-ikv"] + return super().extra_agent_run_arg(benchmark, args, image_run_args) + self.short_run_args() + ["-ikv"] def extra_profile_run_arg(self, benchmark, args, image_run_args, should_strip_run_args): - return super(SpecJVM2008NativeImageBenchmarkSuite, self).extra_profile_run_arg(benchmark, args, image_run_args, should_strip_run_args) + self.short_run_args() + ["-ikv"] + return super().extra_profile_run_arg(benchmark, args, image_run_args, should_strip_run_args) + self.short_run_args() + ["-ikv"] def extra_image_build_argument(self, benchmark, args): - return super(SpecJVM2008NativeImageBenchmarkSuite, self).extra_image_build_argument(benchmark, args) + mx_sdk_vm_impl.svm_experimental_options(['-H:-ParseRuntimeOptions']) + return super().extra_image_build_argument(benchmark, args) + mx_sdk_vm_impl.svm_experimental_options(['-H:-ParseRuntimeOptions']) def extra_run_arg(self, benchmark, args, image_run_args): # disables formatted report generation since chart generation with JFreeChart loads fonts from disk (from java.home) to compute string width disable_rendered_report = ["-ctf", "false", "-chf", "false"] - return super(SpecJVM2008NativeImageBenchmarkSuite, self).extra_run_arg(benchmark, args, image_run_args) + disable_rendered_report + ["-ikv", "-wt", "5", "-it", "15"] + return super().extra_run_arg(benchmark, args, image_run_args) + disable_rendered_report + ["-ikv", "-wt", "5", "-it", "15"] + + def successPatterns(self): + return super().successPatterns() + [_successful_stage_pattern] mx_benchmark.add_bm_suite(SpecJVM2008NativeImageBenchmarkSuite()) From 2c1d5a02ce015efe765f9954814bffe76e0c7727 Mon Sep 17 00:00:00 2001 From: Fengyun Liu Date: Tue, 14 Nov 2023 10:59:29 +0100 Subject: [PATCH 03/11] Avoid nesting of svm_experimental_options: SVM rejects --- substratevm/mx.substratevm/mx_substratevm_benchmark.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/substratevm/mx.substratevm/mx_substratevm_benchmark.py b/substratevm/mx.substratevm/mx_substratevm_benchmark.py index a9fcad4d7fc0..986acf292a30 100644 --- a/substratevm/mx.substratevm/mx_substratevm_benchmark.py +++ b/substratevm/mx.substratevm/mx_substratevm_benchmark.py @@ -655,7 +655,8 @@ def extra_profile_run_arg(self, benchmark, args, image_run_args, should_strip_ru return super().extra_profile_run_arg(benchmark, args, image_run_args, should_strip_run_args) + self.short_run_args() + ["-ikv"] def extra_image_build_argument(self, benchmark, args): - return super().extra_image_build_argument(benchmark, args) + mx_sdk_vm_impl.svm_experimental_options(['-H:-ParseRuntimeOptions']) + # Don't wrap the option `-H:-ParseRuntimeOptions` with `mx_sdk_vm_impl.svm_experimental_options`, as all args are wrapped already. + return super().extra_image_build_argument(benchmark, args) + ['-H:-ParseRuntimeOptions'] def extra_run_arg(self, benchmark, args, image_run_args): # disables formatted report generation since chart generation with JFreeChart loads fonts from disk (from java.home) to compute string width From f70305235805baf6b4ccefc65e3e29cd8505709d Mon Sep 17 00:00:00 2001 From: Fengyun Liu Date: Wed, 15 Nov 2023 12:20:21 +0100 Subject: [PATCH 04/11] Use -R:ProfilesDumpFile at build-time instead of -XX:ProfilesDumpFile at app run-time: SpecJvm2008 rejects --- vm/mx.vm/mx_vm_benchmark.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vm/mx.vm/mx_vm_benchmark.py b/vm/mx.vm/mx_vm_benchmark.py index 8771a17496c2..d87f4c634124 100644 --- a/vm/mx.vm/mx_vm_benchmark.py +++ b/vm/mx.vm/mx_vm_benchmark.py @@ -928,9 +928,9 @@ def run_stage_agent(self, config, stages): if file.endswith(".json"): zipf.write(os.path.join(root, file), os.path.relpath(os.path.join(root, file), os.path.join(path, '..'))) - def run_stage_instrument_image(self, config, stages, out, i, instrumentation_image_name, image_path, image_path_latest, instrumented_iterations): + def run_stage_instrument_image(self, config, stages, out, i, instrumentation_image_name, image_path, image_path_latest, instrumented_iterations, profile_path): executable_name_args = ['-o', instrumentation_image_name] - pgo_args = ['--pgo=' + config.latest_profile_path] + pgo_args = ['--pgo=' + config.latest_profile_path, '-R:ProfilesDumpFile=' + profile_path] pgo_args += svm_experimental_options(['-H:' + ('+' if self.pgo_context_sensitive else '-') + 'PGOContextSensitivityEnabled']) instrument_args = ['--pgo-instrument'] + ([] if i == 0 else pgo_args) if self.jdk_profiles_collect: @@ -963,7 +963,7 @@ def _ensureSamplesAreInProfile(self, profile_path): assert sample["records"][0] > 0, "Sampling profiles seem to have a 0 in records in file " + profile_path def run_stage_instrument_run(self, config, stages, image_path, profile_path): - image_run_cmd = [image_path, '-XX:ProfilesDumpFile=' + profile_path] + image_run_cmd = [image_path] image_run_cmd += config.extra_jvm_args image_run_cmd += config.extra_profile_run_args with stages.set_command(image_run_cmd) as s: @@ -1080,7 +1080,7 @@ def run_java(self, args, out=None, err=None, cwd=None, nonZeroIsFatal=False): image_path = os.path.join(config.output_dir, instrumentation_image_name) image_path_latest = os.path.join(config.output_dir, instrumentation_image_latest) if stages.change_stage('instrument-image', str(i)): - self.run_stage_instrument_image(config, stages, out, i, instrumentation_image_name, image_path, image_path_latest, instrumented_iterations) + self.run_stage_instrument_image(config, stages, out, i, instrumentation_image_name, image_path, image_path_latest, instrumented_iterations, profile_path) if stages.change_stage('instrument-run', str(i)): self.run_stage_instrument_run(config, stages, image_path, profile_path) From 4e222de43758c941b4096c50fe7354a3900a0fda Mon Sep 17 00:00:00 2001 From: Fengyun Liu Date: Thu, 16 Nov 2023 17:19:16 +0100 Subject: [PATCH 05/11] Disable rendering report --- substratevm/mx.substratevm/mx_substratevm_benchmark.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/substratevm/mx.substratevm/mx_substratevm_benchmark.py b/substratevm/mx.substratevm/mx_substratevm_benchmark.py index 986acf292a30..625019618e78 100644 --- a/substratevm/mx.substratevm/mx_substratevm_benchmark.py +++ b/substratevm/mx.substratevm/mx_substratevm_benchmark.py @@ -627,6 +627,8 @@ class SpecJVM2008NativeImageBenchmarkSuite(mx_java_benchmarks.SpecJvm2008Benchma """ SpecJVM2008 for Native Image """ + # disables formatted report generation since chart generation with JFreeChart loads fonts from disk (from java.home) to compute string width + disable_rendered_report = ["-ctf", "false", "-chf", "false"] def name(self): return 'specjvm2008-native-image' @@ -636,6 +638,7 @@ def benchSuiteName(self, bmSuiteArgs=None): def createCommandLineArgs(self, benchmarks, bmSuiteArgs): args = super().createCommandLineArgs(benchmarks, bmSuiteArgs) + if benchmarks is None: mx.abort("Suite can only run a single benchmark per VM instance.") elif len(benchmarks) != 1: @@ -646,7 +649,7 @@ def createCommandLineArgs(self, benchmarks, bmSuiteArgs): @staticmethod def short_run_args(): - return ["-wt", "1", "-it", "5"] + return SpecJVM2008NativeImageBenchmarkSuite.disable_rendered_report + ["-wt", "1", "-it", "5"] def extra_agent_run_arg(self, benchmark, args, image_run_args): return super().extra_agent_run_arg(benchmark, args, image_run_args) + self.short_run_args() + ["-ikv"] @@ -659,9 +662,7 @@ def extra_image_build_argument(self, benchmark, args): return super().extra_image_build_argument(benchmark, args) + ['-H:-ParseRuntimeOptions'] def extra_run_arg(self, benchmark, args, image_run_args): - # disables formatted report generation since chart generation with JFreeChart loads fonts from disk (from java.home) to compute string width - disable_rendered_report = ["-ctf", "false", "-chf", "false"] - return super().extra_run_arg(benchmark, args, image_run_args) + disable_rendered_report + ["-ikv", "-wt", "5", "-it", "15"] + return super().extra_run_arg(benchmark, args, image_run_args) + SpecJVM2008NativeImageBenchmarkSuite.disable_rendered_report + ["-ikv", "-wt", "5", "-it", "15"] def successPatterns(self): return super().successPatterns() + [_successful_stage_pattern] From 397f66b4de1f113a3a4b1692e2e4bf50eff8b8de Mon Sep 17 00:00:00 2001 From: Fengyun Liu Date: Thu, 16 Nov 2023 18:57:42 +0100 Subject: [PATCH 06/11] Make sure instrumentation works on the first iteration --- vm/mx.vm/mx_vm_benchmark.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vm/mx.vm/mx_vm_benchmark.py b/vm/mx.vm/mx_vm_benchmark.py index d87f4c634124..5bca3504f8db 100644 --- a/vm/mx.vm/mx_vm_benchmark.py +++ b/vm/mx.vm/mx_vm_benchmark.py @@ -930,9 +930,9 @@ def run_stage_agent(self, config, stages): def run_stage_instrument_image(self, config, stages, out, i, instrumentation_image_name, image_path, image_path_latest, instrumented_iterations, profile_path): executable_name_args = ['-o', instrumentation_image_name] - pgo_args = ['--pgo=' + config.latest_profile_path, '-R:ProfilesDumpFile=' + profile_path] + pgo_args = ['--pgo=' + config.latest_profile_path] pgo_args += svm_experimental_options(['-H:' + ('+' if self.pgo_context_sensitive else '-') + 'PGOContextSensitivityEnabled']) - instrument_args = ['--pgo-instrument'] + ([] if i == 0 else pgo_args) + instrument_args = ['--pgo-instrument', '-R:ProfilesDumpFile=' + profile_path] + ([] if i == 0 else pgo_args) if self.jdk_profiles_collect: instrument_args += svm_experimental_options(['-H:+ProfilingEnabled', '-H:+AOTPriorityInline', '-H:-SamplingCollect', f'-H:ProfilingPackagePrefixes={self.generate_profiling_package_prefixes()}']) From a99df066ab2bb3a55191de2b81c7fba5f1996238 Mon Sep 17 00:00:00 2001 From: Fengyun Liu Date: Fri, 17 Nov 2023 10:04:45 +0100 Subject: [PATCH 07/11] Use short iteration by default --- .../mx.substratevm/mx_substratevm_benchmark.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/substratevm/mx.substratevm/mx_substratevm_benchmark.py b/substratevm/mx.substratevm/mx_substratevm_benchmark.py index 625019618e78..345249a01066 100644 --- a/substratevm/mx.substratevm/mx_substratevm_benchmark.py +++ b/substratevm/mx.substratevm/mx_substratevm_benchmark.py @@ -629,6 +629,7 @@ class SpecJVM2008NativeImageBenchmarkSuite(mx_java_benchmarks.SpecJvm2008Benchma """ # disables formatted report generation since chart generation with JFreeChart loads fonts from disk (from java.home) to compute string width disable_rendered_report = ["-ctf", "false", "-chf", "false"] + short_run_args = disable_rendered_report + ["-wt", "1", "-it", "1", "-ikv"] def name(self): return 'specjvm2008-native-image' @@ -647,22 +648,18 @@ def createCommandLineArgs(self, benchmarks, bmSuiteArgs): self.benchmark_name = benchmarks[0] return args - @staticmethod - def short_run_args(): - return SpecJVM2008NativeImageBenchmarkSuite.disable_rendered_report + ["-wt", "1", "-it", "5"] - def extra_agent_run_arg(self, benchmark, args, image_run_args): - return super().extra_agent_run_arg(benchmark, args, image_run_args) + self.short_run_args() + ["-ikv"] + return super().extra_agent_run_arg(benchmark, args, image_run_args) + SpecJVM2008NativeImageBenchmarkSuite.short_run_args def extra_profile_run_arg(self, benchmark, args, image_run_args, should_strip_run_args): - return super().extra_profile_run_arg(benchmark, args, image_run_args, should_strip_run_args) + self.short_run_args() + ["-ikv"] + return super().extra_profile_run_arg(benchmark, args, image_run_args, should_strip_run_args) + SpecJVM2008NativeImageBenchmarkSuite.short_run_args def extra_image_build_argument(self, benchmark, args): # Don't wrap the option `-H:-ParseRuntimeOptions` with `mx_sdk_vm_impl.svm_experimental_options`, as all args are wrapped already. return super().extra_image_build_argument(benchmark, args) + ['-H:-ParseRuntimeOptions'] def extra_run_arg(self, benchmark, args, image_run_args): - return super().extra_run_arg(benchmark, args, image_run_args) + SpecJVM2008NativeImageBenchmarkSuite.disable_rendered_report + ["-ikv", "-wt", "5", "-it", "15"] + return super().extra_run_arg(benchmark, args, image_run_args) + SpecJVM2008NativeImageBenchmarkSuite.short_run_args def successPatterns(self): return super().successPatterns() + [_successful_stage_pattern] From da48646039d180d3e1bcee6673b02a93c84a8b28 Mon Sep 17 00:00:00 2001 From: Fengyun Liu Date: Wed, 22 Nov 2023 11:51:11 +0100 Subject: [PATCH 08/11] =?UTF-8?q?Avoid=20non-determinism=20in=20testing=20?= =?UTF-8?q?SpecJvm2008=20(Thanks=20Fran=C3=A7ois)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ci/ci_common/benchmark-suites.libsonnet | 3 --- .../mx.java-benchmarks/mx_java_benchmarks.py | 19 ++++++++++++------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/compiler/ci/ci_common/benchmark-suites.libsonnet b/compiler/ci/ci_common/benchmark-suites.libsonnet index 033c897b86fc..2ea20d4f134a 100644 --- a/compiler/ci/ci_common/benchmark-suites.libsonnet +++ b/compiler/ci/ci_common/benchmark-suites.libsonnet @@ -172,9 +172,6 @@ run+: [ self.benchmark_cmd + ["specjvm2008:*", "--"] + self.extra_vm_args + ["--", "-ikv", "-it", "240s", "-wt", "120s"] ], - teardown+: [ - ["rm", "-r", "${SPECJVM2008}/results"] - ], timelimit: "3:00:00", forks_batches:: 5, forks_timelimit:: "06:00:00", diff --git a/java-benchmarks/mx.java-benchmarks/mx_java_benchmarks.py b/java-benchmarks/mx.java-benchmarks/mx_java_benchmarks.py index 7b8bd3eb6d69..e2ef50afe467 100644 --- a/java-benchmarks/mx.java-benchmarks/mx_java_benchmarks.py +++ b/java-benchmarks/mx.java-benchmarks/mx_java_benchmarks.py @@ -29,6 +29,7 @@ import os from os.path import join, exists import json +import shutil from shutil import rmtree from tempfile import mkdtemp, mkstemp @@ -1364,8 +1365,7 @@ def workloadSize(self): if 'startup.compiler.compiler' in _allSpecJVM2008BenchesJDK9: _allSpecJVM2008BenchesJDK9.remove('startup.compiler.compiler') - -class SpecJvm2008BenchmarkSuite(mx_benchmark.JavaBenchmarkSuite): +class SpecJvm2008BenchmarkSuite(mx_benchmark.JavaBenchmarkSuite, mx_benchmark.TemporaryWorkdirMixin): """SpecJVM2008 benchmark suite implementation. This benchmark suite can run multiple benchmarks as part of one VM run. @@ -1384,11 +1384,19 @@ def specJvmPath(self): if specjvm2008 is None: mx.abort("Please set the SPECJVM2008 environment variable to a " + "SPECjvm2008 directory.") - jarpath = join(specjvm2008, "SPECjvm2008.jar") + jarname = "SPECjvm2008.jar" + jarpath = join(specjvm2008, jarname) if not exists(jarpath): mx.abort("The SPECJVM2008 environment variable points to a directory " + "without the SPECjvm2008.jar file.") - return jarpath + + # copy to newly-created temporary working directory + working_dir_jarpath = os.path.abspath(join(self.workdir, jarname)) + if not exists(working_dir_jarpath): + mx.log("copying " + specjvm2008 + " to " + self.workdir) + shutil.copytree(specjvm2008, self.workdir, dirs_exist_ok=True) + + return working_dir_jarpath def validateEnvironment(self): if not self.specJvmPath(): @@ -1398,9 +1406,6 @@ def validateEnvironment(self): def validateReturnCode(self, retcode): return retcode == 0 - def workingDirectory(self, benchmarks, bmSuiteArgs): - return mx.get_env("SPECJVM2008") - def createCommandLineArgs(self, benchmarks, bmSuiteArgs): if benchmarks is None: # No benchmark specified in the command line, so run everything. From 9cbb8d478a0a4665bc36c298b6f2af8fc20af151 Mon Sep 17 00:00:00 2001 From: Fengyun Liu Date: Thu, 30 Nov 2023 17:53:47 +0100 Subject: [PATCH 09/11] Increase compilation timeout --- substratevm/mx.substratevm/mx_substratevm_benchmark.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substratevm/mx.substratevm/mx_substratevm_benchmark.py b/substratevm/mx.substratevm/mx_substratevm_benchmark.py index 345249a01066..c734cb7d38c1 100644 --- a/substratevm/mx.substratevm/mx_substratevm_benchmark.py +++ b/substratevm/mx.substratevm/mx_substratevm_benchmark.py @@ -656,7 +656,7 @@ def extra_profile_run_arg(self, benchmark, args, image_run_args, should_strip_ru def extra_image_build_argument(self, benchmark, args): # Don't wrap the option `-H:-ParseRuntimeOptions` with `mx_sdk_vm_impl.svm_experimental_options`, as all args are wrapped already. - return super().extra_image_build_argument(benchmark, args) + ['-H:-ParseRuntimeOptions'] + return super().extra_image_build_argument(benchmark, args) + ['-H:-ParseRuntimeOptions', '-H:CompilationExpirationPeriod=600'] def extra_run_arg(self, benchmark, args, image_run_args): return super().extra_run_arg(benchmark, args, image_run_args) + SpecJVM2008NativeImageBenchmarkSuite.short_run_args From d9ef8db7c45f0602310fe872010a94c85c1fd7b5 Mon Sep 17 00:00:00 2001 From: Fengyun Liu Date: Fri, 1 Dec 2023 13:57:53 +0100 Subject: [PATCH 10/11] Use more iterations for bench --- substratevm/mx.substratevm/mx_substratevm_benchmark.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/substratevm/mx.substratevm/mx_substratevm_benchmark.py b/substratevm/mx.substratevm/mx_substratevm_benchmark.py index c734cb7d38c1..875c35bc0153 100644 --- a/substratevm/mx.substratevm/mx_substratevm_benchmark.py +++ b/substratevm/mx.substratevm/mx_substratevm_benchmark.py @@ -630,6 +630,7 @@ class SpecJVM2008NativeImageBenchmarkSuite(mx_java_benchmarks.SpecJvm2008Benchma # disables formatted report generation since chart generation with JFreeChart loads fonts from disk (from java.home) to compute string width disable_rendered_report = ["-ctf", "false", "-chf", "false"] short_run_args = disable_rendered_report + ["-wt", "1", "-it", "1", "-ikv"] + long_run_args = disable_rendered_report + ["-wt", "10", "-it", "5", "-ikv"] def name(self): return 'specjvm2008-native-image' @@ -656,10 +657,11 @@ def extra_profile_run_arg(self, benchmark, args, image_run_args, should_strip_ru def extra_image_build_argument(self, benchmark, args): # Don't wrap the option `-H:-ParseRuntimeOptions` with `mx_sdk_vm_impl.svm_experimental_options`, as all args are wrapped already. + # The reason to add `-H:CompilationExpirationPeriod` is that we encounter non-deterministic compiler crash due to expiration. return super().extra_image_build_argument(benchmark, args) + ['-H:-ParseRuntimeOptions', '-H:CompilationExpirationPeriod=600'] def extra_run_arg(self, benchmark, args, image_run_args): - return super().extra_run_arg(benchmark, args, image_run_args) + SpecJVM2008NativeImageBenchmarkSuite.short_run_args + return super().extra_run_arg(benchmark, args, image_run_args) + SpecJVM2008NativeImageBenchmarkSuite.long_run_args def successPatterns(self): return super().successPatterns() + [_successful_stage_pattern] From 7b1fd18265863e092d1ab87efc6be114354415a3 Mon Sep 17 00:00:00 2001 From: Fengyun Liu Date: Wed, 6 Dec 2023 13:24:53 +0100 Subject: [PATCH 11/11] Add ticket number to comment --- substratevm/mx.substratevm/mx_substratevm_benchmark.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substratevm/mx.substratevm/mx_substratevm_benchmark.py b/substratevm/mx.substratevm/mx_substratevm_benchmark.py index 875c35bc0153..b42982dca4f8 100644 --- a/substratevm/mx.substratevm/mx_substratevm_benchmark.py +++ b/substratevm/mx.substratevm/mx_substratevm_benchmark.py @@ -657,7 +657,7 @@ def extra_profile_run_arg(self, benchmark, args, image_run_args, should_strip_ru def extra_image_build_argument(self, benchmark, args): # Don't wrap the option `-H:-ParseRuntimeOptions` with `mx_sdk_vm_impl.svm_experimental_options`, as all args are wrapped already. - # The reason to add `-H:CompilationExpirationPeriod` is that we encounter non-deterministic compiler crash due to expiration. + # The reason to add `-H:CompilationExpirationPeriod` is that we encounter non-deterministic compiler crash due to expiration (GR-50701). return super().extra_image_build_argument(benchmark, args) + ['-H:-ParseRuntimeOptions', '-H:CompilationExpirationPeriod=600'] def extra_run_arg(self, benchmark, args, image_run_args):