jdk9 VarHandle and Fence methods

Vitaly Davidovich vitalyd at gmail.com
Sun Aug 23 17:37:35 UTC 2015


There may not be a mapping to the cpu, but what about compiler barriers?
LoadLoad is cheaper than acquire since it would allow subsequent stores to
move before the load.

sent from my phone
On Aug 23, 2015 7:41 AM, "Doug Lea" <dl at cs.oswego.edu> wrote:

> On 08/22/2015 01:54 PM, Gil Tene wrote:
>> Its' great to see storeStoreFence() and loadLoadFence() in the Fences
>> class.
>> For completeness, I would really like to see loadStoreFence() and
>> storeLoadFence() there as well.
> We're claiming that they are complete, as viewed as:
> reads:  fullFence > acquireFence > loadLoadFence
> writes: fullFence > releaseFence > storeStoreFence
> We don't think that there are any defensible use cases that escape these,
> and also no processor mappings that could exploit them.
> In fact, even loadLoad seems to lack distinct mappings on processors
> supported by hotspot, so will for now be internally equated to acquire.
> -Doug

More information about the valhalla-dev mailing list