How can I see the code that HotSpot generates after optimizing?

This question already has an answer here:

  • How to see JIT-compiled code in JVM? 7 answers

  • You will need to start the JVM with the options -XX:+PrintAssembly and -XX:UnlockDiagnosticVMOptions , but PrintAssembly requires the JVM to have the hsdis binary (HotSpot disassembler). The hsdis binary is not distributed with the JVM due to license incompatibility, so you will need to compile hsdis yourself or find a prebuilt hsdis binary from an unofficial web site.

    To make sense of the output, a tool like JITWatch is useful. Follow its instructions to write the debug information to a log file which can be analyzed in JITWatch.


    http://mail.openjdk.java.net/pipermail/hotspot-dev/2009-February/001255.html

    链接地址: http://www.djcxy.com/p/2482.html

    上一篇: 确定整数的平方根是否为整数的最快方法

    下一篇: 如何在优化后查看HotSpot生成的代码?