RFR: 8216350: AArch64: monitor unlock fast path not called

Andrew Haley aph at redhat.com
Tue Jan 8 09:02:48 UTC 2019


On 1/8/19 9:00 AM, Nick Gasson (Arm Technology China) wrote:
> Hi Andrew,
> 
> On 08/01/2019 16:49, Andrew Haley wrote:
>>
>> Thanks. How does this compare with the x86 code?
>>
> 
> In macroAssembler_x86.cpp MacroAssembler::fast_lock the _LP64 version 
> also uses markOopDesc::unused_mark()
> 
>    // Unconditionally set box->_displaced_header = 
> markOopDesc::unused_mark().
>    // Without cast to int32_t movptr will destroy r10 which is typically 
> obj.
>    movptr(Address(boxReg, 0), 
> (int32_t)intptr_t(markOopDesc::unused_mark()));
> 
> (The !_LP64 version uses the literal "3" which is just 
> markOopDesc::unused_mark anyway.)
> 
> And then in the x86 fast_unlock they are testing the same bit as AArch64:
> 
>    testptr(tmpReg, markOopDesc::monitor_value);    // Inflated?

OK, the patch is good. Thanks.

-- 
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


More information about the hotspot-compiler-dev mailing list