Home >Java >javaTutorial >How Can I Inspect JIT-Compiled Java Code?
Inspecting JIT-Compiled Code in the JVM
Accessing JIT Output
To view the native code generated by the JIT compiler in a Java Virtual Machine (JVM), employ the following JVM options:
-XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly
Filtering on Specific Methods
Alternatively, you can filter on a particular method using the syntax:
-XX:+UnlockDiagnosticVMOptions -XX:CompileCommand=print,*MyClass.myMethod
Windows Considerations
For Windows users, you must first install hsdis-amd64.dll and hsdis-i386.dll from the fcml project.
Step-by-Step Installation Guide for Windows
Install Cygwin and select the following packages:
Compile hsdis-amd64.dll:
Compile hsdis-i386.dll:
Copy the DLL to your JRE's bin directory:
The above is the detailed content of How Can I Inspect JIT-Compiled Java Code?. For more information, please follow other related articles on the PHP Chinese website!