RFR JDK-8207259: [lworld] Ensure VarHandle compare and set/exchange work for inline types
mandy.chung at oracle.com
Fri Jun 21 16:12:46 UTC 2019
On 6/21/19 8:55 AM, Roger Riggs wrote:
> Hi Mandy,
> This looks ok, though I may not understand it fully.
Thanks for the review.
> Also, I'm seeing a failure in the ArrayElementVarHandleTest.
> # Internal Error (interpreterRuntime.cpp:530), pid=14848, tid=14866
> # guarantee(!HAS_PENDING_EXCEPTION) failed: isSubstitutable() raised
> The attached sample fails the same way; though it may be a different
It's a different issue and I think I have a fix for it.
> Regards Roger
> On 6/19/19 2:26 PM, Mandy Chung wrote:
>> This patch is an interim fix to get VarHandle CAS and CAE to work
>> for inline types and use substitutability test instead of equals.
>> Unsafe::compareAndSetReference and compareAndExchangeReference
>> (along with its weakXXX variants) do pointer-comparison. A reference
>> can be an instance of an inline class (indirect or non-flattened)
>> or of an indirect class. CAS/CAE on two inlineable reference instances
>> should do substitutability test. I add a couple Unsafe APIs for CAS/CAE
>> to take the field type and revisit this in LW10 w.r.t atomicity.
>> Webrev at:
More information about the valhalla-dev