JIT compiler log JVM option

If you want to see the log the JIT compiler is producing when running java and starting up the JVM in either client or server mode, you would need the -XX:+LogCompilation JVM flag option. In order to pass this flag we also need -XX:+UnlockDiagnosticVMOptions as well as -XX:LogFile= to store the XML log output that is produced.

In short for c1 JIT compiler or in other words JVM in client mode:

java -d32 -XX:+UnlockDiagnosticVMOptions -XX:+LogCompilation -XX:LogFile=output.xml Main

less ./output.xml | grep C1

for c2 JIT compiler or in other words JVM in server mode (Mac OS X JVM default mode):

java -XX:+UnlockDiagnosticVMOptions -XX:+LogCompilation -XX:LogFile=output.xml Main

less ./output.xml | grep C2

For further reading: LogCompilation Overview