Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

which compiler is used when -server -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler

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?

like image 669
Sagar Avatar asked Apr 04 '19 16:04

Sagar


1 Answers

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' ..... 
like image 56
Eugene Avatar answered Oct 12 '22 15:10

Eugene