反汇编

本文介绍将JIT编译后的机器代码反汇编成汇编代码的方法。


1. JVM增加如下参数

-Xcomp
-XX:+UnlockDiagnosticVMOptions
-XX:+PrintAssembly
-XX:CompileCommand=compileonly,*DCLSingleton.getInstance

-XX:CompileCommand=dontinline,*DCLSingleton.getInstance


2. 需要一个disassembler(反汇编插件)

网上下载hsdis-amd64.dylib (for mac)放置到jre的lib目录中




------------------------------------------

javap -v -p -s -sysinfo -constants classes/xxx/Xxxx.class







猜你喜欢

转载自blog.csdn.net/morning_china/article/details/79453791