[JVM] How to track native code compilation for Java methods

JVM JIT is an awesome piece of Software craftsmanship. JIT compiles Java byte code to native platform code. The natively compiled code is stored in CodeCache, which is outside Java Heap and PermGen space. Watching this process can help in tuning CodeCache size if needed.

Add the following parameter to JVM to see when a method is compiled to native code

-XX:+PrintCompilation

This shall print a line on console each time a method is compiled. To see a summary compile time at the end use the following