Skip to content

Commit dd630f4

Browse files
committed
Switch to SGC with compacting old gen and enable relative code pointers to reduce rss
1 parent 5d572e6 commit dd630f4

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

mx.graalpython/mx_graalpython.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,16 +297,21 @@ def libpythonvm_build_args():
297297
if graalos := ("musl" in mx_subst.path_substitutions.substitute("<multitarget_libc_selection>")):
298298
build_args += ['-H:+GraalOS']
299299
else:
300-
build_args += ["-Dpolyglot.image-build-time.PreinitializeContexts=python"]
300+
build_args += [
301+
"-Dpolyglot.image-build-time.PreinitializeContexts=python",
302+
"-H:+UnlockExperimentalVMOptions",
303+
'-H:+RelativeCodePointers',
304+
'-H:+CompactingOldGen',
305+
"-H:-UnlockExperimentalVMOptions",
306+
]
301307

302308
if (
303-
mx.is_linux()
304-
and not graalos
309+
not graalos
305310
and mx_sdk_vm_ng.is_nativeimage_ee()
306311
and not os.environ.get('NATIVE_IMAGE_AUXILIARY_ENGINE_CACHE')
307312
and not _is_overridden_native_image_arg("--gc")
308313
):
309-
build_args += ['--gc=G1', '-H:-ProtectionKeys']
314+
build_args += ['-H:-ProtectionKeys']
310315

311316
profile = None
312317
if (

0 commit comments

Comments
 (0)