Skip to content

Commit ab76b64

Browse files
committed
Add compacting-gc vm config variants to mx
1 parent 2e0def0 commit ab76b64

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

vm/mx.vm/mx_vm_benchmark.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,8 @@ def __init__(self, vm: NativeImageVM, bm_suite: BenchmarkSuite | NativeImageBenc
230230
base_image_build_args += ['-H:+UseStringInlining']
231231
if vm.use_open_type_world:
232232
base_image_build_args += ['-H:-ClosedTypeWorld']
233+
if vm.use_compacting_gc:
234+
base_image_build_args += ['-H:+CompactingOldGen']
233235
if vm.is_llvm:
234236
base_image_build_args += ['--features=org.graalvm.home.HomeFinderFeature'] + ['-H:CompilerBackend=llvm', '-H:DeadlockWatchdogInterval=0']
235237
if vm.gc:
@@ -531,6 +533,7 @@ def __init__(self, name, config_name, extra_java_args=None, extra_launcher_args=
531533
self.native_architecture = False
532534
self.use_upx = False
533535
self.use_open_type_world = False
536+
self.use_compacting_gc = False
534537
self.graalvm_edition = None
535538
self.config: Optional[NativeImageBenchmarkConfig] = None
536539
self.stages_info: Optional[StagesInfo] = None
@@ -569,6 +572,8 @@ def config_name(self):
569572
config += ["string-inlining"]
570573
if self.use_open_type_world is True:
571574
config += ["otw"]
575+
if self.use_compacting_gc is True:
576+
config += ["compacting-gc"]
572577
if self.is_gate is True:
573578
config += ["gate"]
574579
if self.use_upx is True:
@@ -637,7 +642,7 @@ def _configure_from_name(self, config_name):
637642
mx.abort(f"config_name must be set. Use 'default' for the default {self.__class__.__name__} configuration.")
638643

639644
# This defines the allowed config names for NativeImageVM. The ones registered will be available via --jvm-config
640-
rule = r'^(?P<native_architecture>native-architecture-)?(?P<string_inlining>string-inlining-)?(?P<otw>otw-)?(?P<gate>gate-)?(?P<upx>upx-)?(?P<quickbuild>quickbuild-)?(?P<gc>g1gc-)?(?P<llvm>llvm-)?(?P<pgo>pgo-|pgo-ctx-insens-|pgo-sampler-)?(?P<inliner>inline-)?' \
645+
rule = r'^(?P<native_architecture>native-architecture-)?(?P<string_inlining>string-inlining-)?(?P<otw>otw-)?(?P<compacting_gc>compacting-gc-)?(?P<gate>gate-)?(?P<upx>upx-)?(?P<quickbuild>quickbuild-)?(?P<gc>g1gc-)?(?P<llvm>llvm-)?(?P<pgo>pgo-|pgo-ctx-insens-|pgo-sampler-)?(?P<inliner>inline-)?' \
641646
r'(?P<analysis_context_sensitivity>insens-|allocsens-|1obj-|2obj1h-|3obj2h-|4obj3h-)?(?P<no_inlining_before_analysis>no-inline-)?(?P<jdk_profiles>jdk-profiles-collect-|adopted-jdk-pgo-)?' \
642647
r'(?P<profile_inference>profile-inference-feature-extraction-|profile-inference-pgo-|profile-inference-debug-)?(?P<sampler>safepoint-sampler-|async-sampler-)?(?P<optimization_level>O0-|O1-|O2-|O3-|Os-)?(default-)?(?P<edition>ce-|ee-)?$'
643648

@@ -667,6 +672,10 @@ def _configure_from_name(self, config_name):
667672
mx.logv(f"'otw' is enabled for {config_name}")
668673
self.use_open_type_world = True
669674

675+
if matching.group("compacting_gc") is not None:
676+
mx.logv(f"'compacting-gc' is enabled for {config_name}")
677+
self.use_compacting_gc = True
678+
670679
if matching.group("quickbuild") is not None:
671680
mx.logv(f"'quickbuild' is enabled for {config_name}")
672681
self.is_quickbuild = True

0 commit comments

Comments
 (0)