PrintAssembly: Passing options to hsdis does not work anymore
vladimir.x.ivanov at oracle.com
Thu Nov 21 12:38:35 UTC 2019
Anyway, filed JDK-8234583 to track it:
On 21.11.2019 15:26, Vladimir Ivanov wrote:
> Thanks for the report, Jean-Philippe.
> My reading is -XX:PrintAssemblyOptions doesn't have any effect starting
> 13. Is it what you observe?
> Best regards,
> Vladimir Ivanov
> On 21.11.2019 15:19, Jean-Philippe BEMPEL wrote:
>> 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)
>> So doing
>> java -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly
>> -XX:PrintAssemblyOptions=intel -version
>> 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
>> not parsed for subsequent calls and _option_bug is not filled.
>> Downside of my fix: options are reparsed for each method disassembled,
>> this is what was done before from what I understood.
>> Jean-Philippe Bempel
More information about the hotspot-dev