Skip to content

Commit 8ae4619

Browse files
committed
Register crema VM configs
1 parent 13f437e commit 8ae4619

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

sdk/mx.sdk/mx_sdk_benchmark.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,8 @@ def __init__(self, vm: NativeImageVM, bm_suite: BenchmarkSuite | NativeImageBenc
431431
base_image_build_args += ['--gc=' + vm.gc] + ['-H:+SpawnIsolates']
432432
if vm.native_architecture:
433433
base_image_build_args += ['-march=native']
434+
if vm.crema:
435+
base_image_build_args += ["-H:+RuntimeClassLoading", "-H:EnableURLProtocols=jar"]
434436
if vm.preserve_all:
435437
base_image_build_args += ['-H:Preserve=all']
436438
if vm.preserve_classpath:
@@ -868,6 +870,7 @@ def __init__(self, name, config_name, extra_java_args=None, extra_launcher_args=
868870
self.is_llvm = False
869871
self.gc = None
870872
self.native_architecture = False
873+
self.crema = False
871874
self.preserve_all = False
872875
self.preserve_classpath = False
873876
self.future_defaults_all = False
@@ -908,6 +911,8 @@ def config_name(self):
908911
config = []
909912
if self.native_architecture is True:
910913
config += ["native-architecture"]
914+
if self.crema is True:
915+
config += ["crema"]
911916
if self.use_string_inlining is True:
912917
config += ["string-inlining"]
913918
if self.use_open_type_world is True:
@@ -998,7 +1003,7 @@ def _configure_from_name(self, config_name):
9981003

9991004
# This defines the allowed config names for NativeImageVM. The ones registered will be available via --jvm-config
10001005
# Note: the order of entries here must match the order of statements in NativeImageVM.config_name()
1001-
rule = r'^(?P<native_architecture>native-architecture-)?(?P<string_inlining>string-inlining-)?(?P<otw>otw-)?(?P<compacting_gc>compacting-gc-)?(?P<preserve_all>preserve-all-)?(?P<preserve_classpath>preserve-classpath-)?' \
1006+
rule = r'^(?P<native_architecture>native-architecture-)?(?P<string_inlining>string-inlining-)?(?P<otw>otw-)?(?P<compacting_gc>compacting-gc-)?(?P<crema>crema-)?(?P<preserve_all>preserve-all-)?(?P<preserve_classpath>preserve-classpath-)?' \
10021007
r'(?P<graalos>graalos-)?(?P<graalhost_graalos>graalhost-graalos-)?(?P<pie>pie-)?(?P<layered>layered-)?' \
10031008
r'(?P<future_defaults_all>future-defaults-all-)?(?P<gate>gate-)?(?P<upx>upx-)?(?P<quickbuild>quickbuild-)?(?P<gc>g1gc-)?' \
10041009
r'(?P<llvm>llvm-)?(?P<pgo>pgo-|pgo-sampler-|pgo-perf-sampler-invoke-multiple-|pgo-perf-sampler-invoke-|pgo-perf-sampler-)?(?P<inliner>inline-)?' \
@@ -1015,6 +1020,10 @@ def _configure_from_name(self, config_name):
10151020
mx.logv(f"'native-architecture' is enabled for {config_name}")
10161021
self.native_architecture = True
10171022

1023+
if matching.group("crema") is not None:
1024+
mx.logv(f"'crema' is enabled for {config_name}")
1025+
self.crema = True
1026+
10181027
if matching.group("preserve_all") is not None:
10191028
mx.logv(f"'preserve-all' is enabled for {config_name}")
10201029
self.preserve_all = True
@@ -2003,12 +2012,12 @@ def register_graalvm_vms():
20032012
for short_name, config_suffix in [(None, ''), ('niee', '-ee'), ('ni', '-ce')]:
20042013
if short_name is None or any(component.short_name == short_name for component in mx_sdk_vm_impl.registered_graalvm_components(stage1=False)):
20052014
config_names = list()
2006-
for main_config in ['default', 'gate', 'llvm', 'native-architecture', 'future-defaults-all', 'preserve-all', 'preserve-classpath'] + analysis_context_sensitivity + (['g1gc', 'pgo', 'g1gc-pgo'] if config_suffix != '-ce' else []):
2015+
for main_config in ['default', 'gate', 'llvm', 'native-architecture', 'crema', 'future-defaults-all', 'preserve-all', 'preserve-classpath'] + analysis_context_sensitivity + (['g1gc', 'pgo', 'g1gc-pgo'] if config_suffix != '-ce' else []):
20072016
config_names.append(f'{main_config}{config_suffix}')
20082017

20092018
for optimization_level in optimization_levels:
20102019
config_names.append(f'{optimization_level}{config_suffix}')
2011-
for main_config in ['llvm', 'native-architecture', 'g1gc', 'native-architecture-g1gc', 'preserve-all', 'preserve-classpath'] + analysis_context_sensitivity:
2020+
for main_config in ['llvm', 'native-architecture', 'crema', 'g1gc', 'native-architecture-g1gc', 'preserve-all', 'preserve-classpath'] + analysis_context_sensitivity:
20122021
config_names.append(f'{main_config}-{optimization_level}{config_suffix}')
20132022

20142023
for config_name in config_names:

0 commit comments

Comments
 (0)