Reference.reachabilityFence

Chris Hegarty chris.hegarty at oracle.com
Sat Dec 12 11:42:35 UTC 2015


> On 12 Dec 2015, at 11:27 a.m., Peter Levart <peter.levart at gmail.com> wrote:
> 
> Hi Paul,
> 
> Your latest code does not build with jdk9/dev as it uses @jdk.internal.vm.annotation.DontInline, but in jdk9/dev the @DontInline is still in java.lang.invoke.
> 
> Is there a plan to push the move of  DontInline annotation before this change as I haven's seen any RFR for the move yet?

https://bugs.openjdk.java.net/browse/JDK-8144223

The change is making its way through hs-comp.

-Chris.

> Regards, Peter
> 
>> On 12/11/2015 10:36 AM, Paul Sandoz wrote:
>> Unless any strong objections are raised I plan to push the latest path on Monday.
>> 
>>> Updated:
>>> 
>>> http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8133348-reachability-fence-jdk/webrev/src/java.base/share/classes/java/lang/ref/Reference.java.sdiff.html <http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8133348-reachability-fence-jdk/webrev/src/java.base/share/classes/java/lang/ref/Reference.java.sdiff.html>
>>> 
>>> I think there is an opportunity to add further examples, but i would like to take a swing at that later on.
>>> 
>>> 
>>>> - I now agree with you and Doug about calling this a "fence".  Can we
>>>>   just name it "fence" rather than the wordier "reachabilityFence"?
>>>>   Looking at a typical invocation,
>>>> 
>>>>       Reference.reachabilityFence();
>>>> 
>>>>   seems a bit redundant while
>>>> 
>>>>       Reference.fence();
>>>> 
>>>>   reads quite nicely.  Is there, or will there ever be, any other kind
>>>>   of reference-related fence?
>>> I doubt there will be another kind of reference fence, but it could be used in conjunction with other memory fences (currently on VarHandles) and if static imports are used it might look rather out of place as to what fence “fence” actually refers to. That is why i prefer the longer more descriptive name.
>>> 
>>> Paul.
> 



More information about the core-libs-dev mailing list