views:

50

answers:

1

There are flags available that provide log information on methods that have been compiled. Where is the information on methods that didn't get compiled and why they didn't get compiled? Being able to see how the hotspot compiler makes its decisions and the reasons for it not compiling certain methods would give me a better understanding of the JVM, and allow me to write better code and possibly optimize some of my methods. Anybody have any thoughts on this subject?

+2  A: 

As per: http://blog.headius.com/2009/01/my-favorite-hotspot-jvm-flags.html

-XX:+PrintCompilation prints out the name of each Java method Hotspot decides to JIT compile. The list will usually show a bunch of core Java class methods initially, and then turn to methods in your application.

My personal belief is this is just going to suck a lot of your time. If you code using best practices and some common sense and then if performance is a problem, profile. You should do fine.

Romain Hippeau