Hotspot Print Assembly
Since google fails at providing this information, and I haven’t blogged in a month:
It is possible to print assembly produced by the SUN Hotspot JVM’s JIT Compiler. In order to do so you will need a debug enabled JVM from http://download.java.net/jdk6/binaries/. The magic flag is +PrintOptoAssembly, and since its a JVM flag it needs a -XX: prefix. Additionally, code is only printed out as assembly if it gets JIT’d – so if you want everything printed, then you reduce the compile threshold. Consequently, an example command look like:
java -server -XX:+PrintOptoAssembly -XX:CompileThreshold=1 SomeJavaClass
Hopefully this is helpful to other people
Add a comment
You are not allowed to comment on this entry as it has restricted commenting permissions.