RFR: [11u] 8217368: AArch64: C2 recursive stack locking optimisation not triggered

Andrew Dinn adinn at redhat.com
Fri Aug 23 09:52:04 UTC 2019


On 23/08/2019 03:19, Nick Gasson wrote:
>> This is tricky to review because the actual bug fix is swamped by the
>> change
>> from expanded inline code to do the three CASes. As far as I can tell the
>> bug fix itself is just a few instructions:
>>
>> Am I right?
> 
> Not quite: you also need to swap the usage of tmp and disp_hdr in the
> "// Compare object markOop with mark ..." block (line 4785 in 11u).

Yes, this switch of tmp for disp_hdr is the critical bit of the change.

> The original webrev.0 contains a more minimal patch, with just the logic
> change. The final patch also included some refactoring to use
> MacroAssembler::cmpxchg which doesn't affect the behaviour but does
> improve the readability significantly.
> 
> http://cr.openjdk.java.net/~ngasson/8217368/webrev.0/src/hotspot/cpu/aarch64/aarch64.ad.udiff.html
Indeed. MacroAssembler::cmpxchg did not exist when the encoding rule was
first written (at least not in its current variant with all the flag
arguments that determine the flavour of compare and update to be used).
Switching to use it is for clarity and simplicity rater than to change
function.

regards,


Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander


More information about the jdk-updates-dev mailing list