summary refs log tree commit diff
path: root/pkgs/development/compilers/openjdk
diff options
context:
space:
mode:
authorAustin Seipp <aseipp@pobox.com>2018-11-16 18:48:25 -0600
committerAustin Seipp <aseipp@pobox.com>2018-11-16 20:22:40 -0600
commit162914742327002d49bd1dde424d399842ff7b5f (patch)
tree6dedef66b30f95074aaacca74829bd2be4bad057 /pkgs/development/compilers/openjdk
parent5c4ed80ad7b7dc080dfc8563c2407972f5576bc7 (diff)
downloadnixpkgs-162914742327002d49bd1dde424d399842ff7b5f.tar
nixpkgs-162914742327002d49bd1dde424d399842ff7b5f.tar.gz
nixpkgs-162914742327002d49bd1dde424d399842ff7b5f.tar.bz2
nixpkgs-162914742327002d49bd1dde424d399842ff7b5f.tar.lz
nixpkgs-162914742327002d49bd1dde424d399842ff7b5f.tar.xz
nixpkgs-162914742327002d49bd1dde424d399842ff7b5f.tar.zst
nixpkgs-162914742327002d49bd1dde424d399842ff7b5f.zip
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>
Diffstat (limited to 'pkgs/development/compilers/openjdk')
-rw-r--r--pkgs/development/compilers/openjdk/11.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkgs/development/compilers/openjdk/11.nix b/pkgs/development/compilers/openjdk/11.nix
index e2d89f3ef72..af383b2f05e 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