I was wondering, is it possible to get eyes on the actual machine code that the HotSpot compiler generates when it compiles a given Java bytecode class or method?
Yes, with -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly
the Hotspot VM can give you that information when it actually executes (compiles) a given bytecode method.
See for example HotSpotInternals Wiki:Print Assembly for details. It does require a disassembler module (hsdis-*.dll on Windows).
A bit more comfortable is using JITWatch (but it uses the same infrastructure from HotSpot).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With