RFR JDK-8207259: [lworld] Ensure VarHandle compare and set/exchange work for inline types
Roger Riggs
Roger.Riggs at oracle.com
Fri Jun 21 15:55:58 UTC 2019
Hi Mandy,
This looks ok, though I may not understand it fully.
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
exception
The attached sample fails the same way; though it may be a different
problem.
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:
> http://cr.openjdk.java.net/~mchung/valhalla/webrevs/8207259/webrev.02/index.html
>
>
> Mandy
More information about the valhalla-dev
mailing list