PrintAssembly: Passing options to hsdis does not work anymore
jean-philippe at bempel.fr
Thu Nov 21 12:19:50 UTC 2019
I have just found an issue with PrintAssemblyOptions since openjdk 13
(still works with openjdk 12)
Before we could change the output of PrintAssembly thanks to
(for example switching to intel syntax instead of AT&T one)
java -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly
with correct hsdis-*.[dll|so] should output assembly with intel syntax.
I have investigated this issue and seems related to the addition of
_optionParsed global flag:
Removing this line fix the issue.
decode_env is created each time a call to Disassembler::decode() is made
but parsing options is made only once.
_option_buf is initialized each time decode_env is created but options are
not parsed for subsequent calls and _option_bug is not filled.
Downside of my fix: options are reparsed for each method disassembled, but
this is what was done before from what I understood.
More information about the hotspot-dev