jdk9 VarHandle and Fence methods

Doug Lea dl at cs.oswego.edu
Sun Aug 23 11:40:43 UTC 2015


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