How to get the JIT compiler logs?
# JDK 8: view JIT compilation logs
java -XX:+PrintCompilation -XX:+UnlockDiagnosticVMOptions \
-XX:+PrintInlining -jar <jar file name>
OR
java -XX:+PrintCompilation -XX:+UnlockDiagnosticVMOptions \
-XX:+PrintInlining <Java file name>
JDK 8 uses two compilers, C1 (Client Compiler) and C2 (Server Compiler), cooperating through tiered compilation:
Then one can see below kind of logs and just throw these logs to some AI tool to understand the meaning-
java -XX:+PrintCompilation -XX:+UnlockDiagnosticVMOptions \
-XX:+PrintInlining -jar <jar file name>
OR
java -XX:+PrintCompilation -XX:+UnlockDiagnosticVMOptions \
-XX:+PrintInlining <Java file name>
JDK 8 uses two compilers, C1 (Client Compiler) and C2 (Server Compiler), cooperating through tiered compilation:
- Level 0: interpreted execution
- Level 1: C1 compilation, no profiling
- Level 2: C1 compilation, limited profiling
- Level 3: C1 compilation, full profiling
- Level 4: C2 compilation (final optimized code)
Then one can see below kind of logs and just throw these logs to some AI tool to understand the meaning-
| compiled.txt | |
| File Size: | 821 kb |
| File Type: | txt |