disassembly

This article describes how to disassemble JIT-compiled machine code into assembly code.


1. JVM adds the following parameters

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

-XX:CompileCommand=dontinline,*DCLSingleton.getInstance


2. Need a disassembler (disassembly plugin)

Download hsdis-amd64.dylib (for mac) online and place it in the lib directory of jre




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

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







Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325493150&siteId=291194637