openjdk11: enable ZGC on x86_64-linux

The Z Garbage Collector is a concurrent, scalable, low latency garbage
collector designed to meet extremely-low-pause-time requirements for
small-to-multi-TB heap sizes.

ZGC can be enabled with the magical incantation:

    $ java -XX:+UnlockExperimentalVMOptions -XX:+UseZGC ...

Currently, ZGC is only available for x86_64-linux (though a port for
aarch64-linux may become available at a future time.) There are also a
number of other features that currently aren't present, such as JVMCI
integration (meaning compiler tools like Graal which require JVMCI will
not work with ZGC enabled.)

Signed-off-by: Austin Seipp <aseipp@pobox.com>
wip/yesman
Austin Seipp 6 years ago
parent 5c4ed80ad7
commit 1629147423
  1. 1
      pkgs/development/compilers/openjdk/11.nix

@ -67,6 +67,7 @@ let
# See https://www.mail-archive.com/openembedded-devel@lists.openembedded.org/msg49006.html
"--with-extra-cflags=-Wno-error=deprecated-declarations -Wno-error=format-contains-nul -Wno-error=unused-result"
''
+ lib.optionalString (architecture == "amd64") "\"--with-jvm-features=zgc\""
+ lib.optionalString minimal "\"--enable-headless-only\""
+ ");"
# https://bugzilla.redhat.com/show_bug.cgi?id=1306558

Loading…
Cancel
Save