I’ve tried following the advice found @ https://wikis.oracle.com/display/HotSpotInternals/PrintAssembly and http://alexshabanov.com/2011/12/29/print-assembly-for-java/ , but it wasn’t of much help. I’m running a 64bit JVM on Windows7, and I’ve put the suggested hsdis-i386.dll file in all folders there’s a jvm.dll, just to be sure.
I seem to have several JVM installations (at least I have one in C:\Program Files (x86)\Java and other in C:\Program Files\Java), so I don’t know whether this is making any difference. From what I’ve seen, doing a java -d32 yields an error, so I must be using the 64bits version one only.
When trying to run
java -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly -server -cp . HelloWorldApp
only my
Hello World!
message is shown, so nothing seems to be happening. Maybe the problem is that hsdis-i386.dll should have other name?
Btw, I’d like to stay away from having to build any kind of source files myself.
Hotspot won’t begin compiling and optimizing until it knows what is important, and when you run such a short program it doesn’t have the opportunity to kick in. Give it something more substantial.