Skip to content

Commit 8f2b648

Browse files
author
Andrija Kolic
committed
Add 'layered' VM config modifier; update to Stage & StagesInfo: stages now include layer information along with the stage name, stages are prepared at a single point in the benchmark; handle layered benchmarks appropriately; introduce LayeredNativeImageBundleBasedBenchmarkMixin as a starting point for supporting layered benchmarks.
1 parent d946a7c commit 8f2b648

File tree

5 files changed

+425
-223
lines changed

5 files changed

+425
-223
lines changed

compiler/ci/ci_common/benchmark-suites.libsonnet

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,15 @@
129129

130130
barista_template(suite_version=null, suite_name="barista", max_jdk_version=null, cmd_app_prefix=["hwloc-bind --cpubind node:0.core:0-3.pu:0 --membind node:0"], non_prefix_barista_args=[]):: cc.compiler_benchmark + {
131131
suite:: suite_name,
132-
local barista_version = "v0.3.4",
132+
local barista_version = "v0.4.2",
133133
local suite_version_args = if suite_version != null then ["--bench-suite-version=" + suite_version] else [],
134134
local prefix_barista_arg = if std.length(cmd_app_prefix) > 0 then [std.format("--cmd-app-prefix=%s", std.join(" ", cmd_app_prefix))] else [],
135135
local all_barista_args = prefix_barista_arg + non_prefix_barista_args,
136136
local barista_args_with_separator = if std.length(all_barista_args) > 0 then ["--"] + all_barista_args else [],
137137
downloads+: {
138138
"WRK": { "name": "wrk", "version": "a211dd5", platformspecific: true},
139139
"WRK2": { "name": "wrk2", "version": "2.1", platformspecific: true},
140-
"BARISTA_BENCHMARKS": { "name": "barista", "version": "0.3.0"}
140+
"BARISTA_BENCHMARKS": { "name": "barista", "version": "0.3.5"}
141141
},
142142
packages+: {
143143
maven: "==3.8.6",

compiler/mx.compiler/mx_graal_benchmark.py

+3-15
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import mx_sdk_benchmark
3434
from mx_benchmark import DataPoints
3535
from mx_sdk_benchmark import DaCapoBenchmarkSuite, ScalaDaCapoBenchmarkSuite, RenaissanceBenchmarkSuite, SpecJvm2008BenchmarkSuite
36-
from mx_sdk_benchmark import JvmciJdkVm, SUCCESSFUL_STAGE_PATTERNS, Stage
36+
from mx_sdk_benchmark import JvmciJdkVm, SUCCESSFUL_STAGE_PATTERNS
3737

3838
_suite = mx.suite('compiler')
3939

@@ -259,20 +259,8 @@ def get_jmh_result_file(self, bm_suite_args: List[str]) -> Optional[str]:
259259
:class:`mx_benchmark.JMHJsonRule`) will produce datapoints at every stage, based on results from a previous
260260
stage.
261261
"""
262-
if self.is_native_mode(bm_suite_args) and not self.stages_info.fallback_mode:
263-
# At this point, the StagesInfo class may not have all the information yet, in that case we rely on the
264-
# requested stage. But if this function is called later again when it is fully set up, we have to use the
265-
# effective stage instead.
266-
# This is important so that the JMH parsing rule is only enabled when the stage actually ran (if it is
267-
# skipped, it would otherwise pick up a previous result file)
268-
if self.stages_info.is_set_up:
269-
current_stage = self.stages_info.effective_stage
270-
else:
271-
current_stage = self.stages_info.requested_stage
272-
273-
if current_stage not in [Stage.AGENT, Stage.INSTRUMENT_RUN, Stage.RUN]:
274-
return None
275-
262+
if self.is_native_mode(bm_suite_args) and not self.stages_info.fallback_mode and self.stages_info.current_stage.is_image():
263+
return None
276264
return super().get_jmh_result_file(bm_suite_args)
277265

278266
def fallback_mode_reason(self, bm_suite_args: List[str]) -> Optional[str]:

0 commit comments

Comments
 (0)