From 162914742327002d49bd1dde424d399842ff7b5f Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Fri, 16 Nov 2018 18:48:25 -0600 Subject: [PATCH] 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 --- pkgs/development/compilers/openjdk/11.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/compilers/openjdk/11.nix b/pkgs/development/compilers/openjdk/11.nix index e2d89f3ef728..af383b2f05e1 100644 --- a/pkgs/development/compilers/openjdk/11.nix +++ b/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