Usage:
Enables printing of assembly code for byte coded and native methods.
Since:
Starting from JDK 6.
Examples:
This will instruct JVM to enable printing of assembly code:
-XX:+PrintAssembly
Description:
The flag is a diagnostic flag for the hotspot JVM that allows us to obtain the JIT compiler/or assembly instructions generated during the interpretation process, which can often be used to help us find problems by analyzing the execution of assembly instructions, or to help us analyze and understand the JVM How it is interpreted and compiled.
Enables printing of assembly code for byte coded and native methods by using the external hsdis-<arch>.so or .dll library. For 64-bit VM on Windows, it’s hsdis-amd64.dll. This lets you to see the generated code, which may help you to diagnose performance issues.
By default, this option is disabled and assembly code isn’t printed. The -XX:+PrintAssembly option has to be used together with the -XX:UnlockDiagnosticVMOptions option that unlocks diagnostic JVM options.
Here is a snippet of the logs displayed when using both flags “-XX:UnlockDiagnosticVMOptions -XX:+PrintAssembly”
If you want to know more about this output and understand it, we recommend you to visit this link PrintAssembly output explained!
Default Value
By default, this option is disabled and assembly code isn’t printed.
Arguments related:
UnlockDiagnosticVMOptions, PrintNMethods, PrintNativeNMethods, PrintSignatureHandlers, PrintAdapterHandlers, PrintStubCode and PrintInterpreter
Related Posts:
Edit your Comment