How to check whether scalar replacement worked?

Scalar replacement in the jvm is pretty cool, but my problem is that I don’t know an easy way to check if and where it works. Does anyone have an idea how to check whether an allocation has been replaced?
So far the only way I found is to run a stress test for the method in question with “-verbose:gc” and see if the gc runs less often.
Any better ideas?

Thanks,
Stefan

You’ll need a debug VM and these flags:

-XX:+UnlockDiagnosticVMOptions
-XX:+PrintEscapeAnalysis
-XX:+PrintEliminateAllocations

Very cool - thanks. A debug VM used to be available for pre-release JDKs, but I don’t find it anymore for JDK 8 or JDK 7u4. Do you build it yourself or is it still available for download?

I use an old build atm. I couldn’t find a recent one either, seems they’re not available anymore.

WHOA! So are you like…from the future?! O_O

WILL THE GREAT TOKYO EARTHQUAKE STRIKE BEFORE JUNE THIS YEAR?!