PrintAssembly: Passing options to hsdis does not work anymore

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Thu Nov 21 12:26:02 UTC 2019


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:
> Hello,
> 
> 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
> PrintAssemblyOptions
> (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:
> https://github.com/openjdk/jdk/blob/master/src/hotspot/share/compiler/disassembler.cpp#L417
> 
> 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.
> 
> Thanks
> Jean-Philippe Bempel
> 


More information about the hotspot-dev mailing list