Skip to content

Commit

Permalink
openjdk11: enable ZGC on x86_64-linux
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
thoughtpolice committed Nov 17, 2018
1 parent 5c4ed80 commit 1629147
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkgs/development/compilers/openjdk/11.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1629147

Please sign in to comment.