Skip to content

Commit

Permalink
add otw config
Browse files Browse the repository at this point in the history
  • Loading branch information
davleopo committed Sep 4, 2024
1 parent d2e8dfd commit 703afc5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion vm/mx.vm/mx_vm_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ def __init__(self, vm: NativeImageVM, bm_suite: BenchmarkSuite | NativeImageBenc
base_image_build_args += ['-Ob']
if vm.use_string_inlining:
base_image_build_args += ['-H:+UseStringInlining']
if vm.use_open_type_world:
base_image_build_args += ['-H:-ClosedTypeWorld']
if vm.is_llvm:
base_image_build_args += ['--features=org.graalvm.home.HomeFinderFeature'] + ['-H:CompilerBackend=llvm', '-H:DeadlockWatchdogInterval=0']
if vm.gc:
Expand Down Expand Up @@ -527,6 +529,7 @@ def __init__(self, name, config_name, extra_java_args=None, extra_launcher_args=
self.gc = None
self.native_architecture = False
self.use_upx = False
self.use_open_type_world = False
self.graalvm_edition = None
self.config: Optional[NativeImageBenchmarkConfig] = None
self.stages_info: Optional[StagesInfo] = None
Expand Down Expand Up @@ -558,7 +561,7 @@ def _configure_from_name(self, config_name):
return

# This defines the allowed config names for NativeImageVM. The ones registered will be available via --jvm-config
rule = r'^(?P<native_architecture>native-architecture-)?(?P<string_inlining>string-inlining-)?(?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-)?' \
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-)?' \
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-)?' \
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-)?(?P<edition>ce-|ee-)?$'

Expand All @@ -584,6 +587,10 @@ def _configure_from_name(self, config_name):
mx.logv(f"'upx' is enabled for {config_name}")
self.use_upx = True

if matching.group("otw") is not None:
mx.logv(f"'otw' is enabled for {config_name}")
self.use_open_type_world = True

if matching.group("quickbuild") is not None:
mx.logv(f"'quickbuild' is enabled for {config_name}")
self.is_quickbuild = True
Expand Down

0 comments on commit 703afc5

Please sign in to comment.