Not able to turn off G1 GC in JDK-9 preview builds?

Attila-Mihaly Balazs dify.ltd at gmail.com
Thu Mar 31 08:44:17 UTC 2016


Hello,

I'm trying to do some benchmarks and was curious what effect using / not
using G1 GC had on it. However I'm unable to turn it off in the latest
JDK-9 beta build (111):

~/jdk-9-111/bin/java -XX:-UseG1GC -XX:+PrintFlagsFinal -version | grep
UseG1GC
     bool UseG1GC                                  :=
true                                {product}
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+111)
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+111, mixed mode)

With JDK-8 this works as expected:

~/jdk1.8.0_72/bin/java -XX:-UseG1GC -XX:+PrintFlagsFinal -version | grep
UseG1GC
     bool UseG1GC                                  :=
false                               {product}
java version "1.8.0_72"
Java(TM) SE Runtime Environment (build 1.8.0_72-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.72-b15, mixed mode)

Any pointers as to what my be the issue? I understand that there is a push
to use G1 GC by default in Java 9, however it was my understanding that the
previous GC algorithms will still be available.

Thank you,
Attila Balazs


More information about the jdk9-dev mailing list