My JVM has -server
option, I believe it enables JVM to use C2 compiler which is meant to use for server applications which tend to run longer than client counterparts. However, GRAAL JIT (which is enabled by -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler
) is meant to replace C2 and my JVM starts even when I give both options like below.
-server -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler
which compiler does it end up using? Graal JIT or C2?
That -server
is simply ignored, read this answer for example. What you can do is run with some extra commands:
java -XX:+UnlockExperimentalVMOptions
-XX:+EnableJVMCI
-XX:+UseJVMCICompiler
-Dgraal.ShowConfiguration=info // this
-XX:+EagerJVMCI // and this matters
The result is will contain:
Using Graal compiler configuration 'community' .....
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With