I would like to know if my no VM argument invocation of HotSpot Java is running with -client, -server, or tiered compilation options. When I supply no VM arguments, which one is chosen by default? Is there a way to output diagnostics about which JIT compiler is running?
The Just-In-Time (JIT) compiler is a component of the Java™ Runtime Environment that improves the performance of Java applications at run time. Java programs consists of classes, which contain platform-neutral bytecodes that can be interpreted by a JVM on many different computer architectures.
JIT is "Just In Time" compiling, basically compiling on the fly. Hotspot is the concept within the JVM where it only compiles the code that's actually being used. That is, the "hot" pieces of code being used over and over.
In order to improve performance, JIT compilers interact with the Java Virtual Machine (JVM) at run time and compile suitable bytecode sequences into native machine code.
The JIT compiler helps improve the performance of Java programs by compiling bytecodes into native machine code at run time. The JIT compiler is enabled by default. When a method has been compiled, the JVM calls the compiled code of that method directly instead of interpreting it.
Slightly better method of determining which JIT compiler is in use.
On a Windows machine with 32-bit JDK8:
$ java -version java version "1.8.0" Java(TM) SE Runtime Environment (build 1.8.0-b132) Java HotSpot(TM) Client VM (build 25.0-b70, mixed mode) $ java -XshowSettings -version 2>&1 | grep sun.management.compiler sun.management.compiler = HotSpot Client Compiler $ java -server -XshowSettings -version 2>&1 | grep sun.management.compiler sun.management.compiler = HotSpot Tiered Compilers
So the Client Compiler is the default with the Windows 32-bit JDK8 and the '-server' option gets you the 32-bit Tiered Compiler.
On a Windows machine with 64-bit JDK8:
$ java -version java version "1.8.0" Java(TM) SE Runtime Environment (build 1.8.0-b132) Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode) $ java -XshowSettings -version 2>&1 | grep sun.management.compiler sun.management.compiler = HotSpot 64-Bit Tiered Compilers
So the Tiered Compiler is the default with the Windows 64-bit JDK8. Oracle does not provide a 64-bit Client VM.
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