@@ -230,6 +230,8 @@ def __init__(self, vm: NativeImageVM, bm_suite: BenchmarkSuite | NativeImageBenc
230
230
base_image_build_args += ['-H:+UseStringInlining' ]
231
231
if vm .use_open_type_world :
232
232
base_image_build_args += ['-H:-ClosedTypeWorld' ]
233
+ if vm .use_compacting_gc :
234
+ base_image_build_args += ['-H:+CompactingOldGen' ]
233
235
if vm .is_llvm :
234
236
base_image_build_args += ['--features=org.graalvm.home.HomeFinderFeature' ] + ['-H:CompilerBackend=llvm' , '-H:DeadlockWatchdogInterval=0' ]
235
237
if vm .gc :
@@ -531,6 +533,7 @@ def __init__(self, name, config_name, extra_java_args=None, extra_launcher_args=
531
533
self .native_architecture = False
532
534
self .use_upx = False
533
535
self .use_open_type_world = False
536
+ self .use_compacting_gc = False
534
537
self .graalvm_edition = None
535
538
self .config : Optional [NativeImageBenchmarkConfig ] = None
536
539
self .stages_info : Optional [StagesInfo ] = None
@@ -569,6 +572,8 @@ def config_name(self):
569
572
config += ["string-inlining" ]
570
573
if self .use_open_type_world is True :
571
574
config += ["otw" ]
575
+ if self .use_compacting_gc is True :
576
+ config += ["compacting-gc" ]
572
577
if self .is_gate is True :
573
578
config += ["gate" ]
574
579
if self .use_upx is True :
@@ -637,7 +642,8 @@ def _configure_from_name(self, config_name):
637
642
mx .abort (f"config_name must be set. Use 'default' for the default { self .__class__ .__name__ } configuration." )
638
643
639
644
# 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-)?' \
646
+ r'(?P<llvm>llvm-)?(?P<pgo>pgo-|pgo-ctx-insens-|pgo-sampler-)?(?P<inliner>inline-)?' \
641
647
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-)?' \
642
648
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-)?$'
643
649
@@ -667,6 +673,10 @@ def _configure_from_name(self, config_name):
667
673
mx .logv (f"'otw' is enabled for { config_name } " )
668
674
self .use_open_type_world = True
669
675
676
+ if matching .group ("compacting_gc" ) is not None :
677
+ mx .logv (f"'compacting-gc' is enabled for { config_name } " )
678
+ self .use_compacting_gc = True
679
+
670
680
if matching .group ("quickbuild" ) is not None :
671
681
mx .logv (f"'quickbuild' is enabled for { config_name } " )
672
682
self .is_quickbuild = True
0 commit comments