Skip to content

Commit cf80b64

Browse files
author
Andrija Kolic
committed
[GR-65944] Support barista that use 1.1.384 micronaut-pegasus
PullRequest: graal/21109
2 parents d8499b7 + c8d019f commit cf80b64

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

compiler/ci/ci_common/benchmark-suites.libsonnet

Lines changed: 2 additions & 2 deletions
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.4.2",
132+
local barista_version = "v0.4.4",
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.5"}
140+
"BARISTA_BENCHMARKS": { "name": "barista", "version": "0.4.4"}
141141
},
142142
packages+: {
143143
maven: "==3.8.6",

sdk/mx.sdk/mx_sdk_benchmark.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2883,6 +2883,9 @@ def baristaDirectoryPath(self):
28832883
"Barista benchmark suite directory.")
28842884
return barista_home
28852885

2886+
def baristaApplicationDirectoryPath(self, benchmark: str) -> Path:
2887+
return Path(self.baristaDirectoryPath()) / "benchmarks" / benchmark
2888+
28862889
def baristaFilePath(self, file_name):
28872890
barista_home = self.baristaDirectoryPath()
28882891
file_path = os.path.abspath(os.path.join(barista_home, file_name))

substratevm/mx.substratevm/mx_substratevm_benchmark.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,14 @@ def get_bundle_path_for_benchmark_standalone(self, benchmark) -> str:
329329
return self._application_nibs[benchmark]
330330

331331
def get_bundle_path_for_benchmark_layer(self, benchmark, layer_info) -> str:
332-
standalone_nib = Path(self.get_bundle_path_for_benchmark_standalone(benchmark))
333-
return (standalone_nib.parent / f"layer{layer_info.index}-{standalone_nib.name}").absolute()
332+
app_dir = self.baristaApplicationDirectoryPath(benchmark)
333+
nib_candidates = list(app_dir.glob(f"**/layer{layer_info.index}-*.nib"))
334+
if len(nib_candidates) == 0:
335+
mx.abort(f"Expected to find exactly one 'layer{layer_info.index}-*.nib' file somewhere in the '{app_dir}' directory subtree, instead found none!")
336+
if len(nib_candidates) > 1:
337+
mx.abort(f"Expected to find exactly one 'layer{layer_info.index}-*.nib' file somewhere in the '{app_dir}' directory subtree, instead found "
338+
+ "multiple: [" + ", ".join(str(path) for path in nib_candidates) + "]")
339+
return str(nib_candidates[0])
334340

335341
def get_latest_layer(self) -> Optional[Layer]:
336342
latest_image_stage = self.execution_context.virtual_machine.stages_info.get_latest_image_stage()
@@ -369,6 +375,12 @@ def extra_run_arg(self, benchmark, args, image_run_args):
369375
# Added by BaristaNativeImageCommand
370376
return []
371377

378+
def build_assertions(self, benchmark: str, is_gate: bool) -> List[str]:
379+
# We cannot enable assertions along with emitting a build report for layered images, due to GR-65751
380+
if self.stages_info.current_stage.is_layered:
381+
return []
382+
return super().build_assertions(benchmark, is_gate)
383+
372384
def run(self, benchmarks, bmSuiteArgs) -> mx_benchmark.DataPoints:
373385
return self.intercept_run(super(), benchmarks, bmSuiteArgs)
374386

0 commit comments

Comments
 (0)