jdk.internal.misc.Unsafe.weakCompareAndSwapObject
Aleksey Shipilev
aleksey.shipilev at oracle.com
Wed Feb 24 18:11:23 UTC 2016
On 02/24/2016 08:53 PM, Andrew Haley wrote:
> On 02/24/2016 05:44 PM, Aleksey Shipilev wrote:
>> Yes, should be like that. In retrospect, we should have documented them
>> straight in Unsafe.java, not in VarHandles, for which these methods are
>> destined.
>
> Yea. This stuff is far too important to be uncommented.
Yes, that was an overlook, basically stemming from our original plan of
pushing VarHandles in one large blob. Let me document those Unsafe entries.
> I'm particularly baffled that only some of these seem to have graph nodes.
Current simplistic implementation does only emit surrounding barriers
around CAS/CAE nodes. Even that change was enough of a headache to get
right.
We were optimistically hoping that you can match the surrounding
barriers into the weaker CAS/CAE form, when weaker barriers are around
the CAS/CAE node. But either way, we could also split CAS/CAE into
multiple {none, acq, rel, acqrel} nodes and match them directly -- which
might both be the conceptually cleaner, and much more intrusive change.
Thanks,
-Aleksey
More information about the hotspot-dev
mailing list