RFR [9] 8140687: Move @Contended to the jdk.internal.vm.annotation package

Chris Hegarty chris.hegarty at oracle.com
Wed Nov 11 12:06:15 UTC 2015


On 9 Nov 2015, at 12:49, Doug Lea <dl at cs.oswego.edu> wrote:

> On 11/09/2015 05:43 AM, Chris Hegarty wrote:
>> On 02/11/15 10:45, Aleksey Shipilev wrote:
>>> On 11/02/2015 02:56 AM, Chris Hegarty wrote:
>>>> In line with the intended location for other VM annotations,
>>>> see 8138732 [1], @sun.misc.Contended should be moved
>>>> to the jdk.internal.vm.annotation package.
>>>> 
>>>> http://cr.openjdk.java.net/~chegar/8140687/00/
>>> 
> 
> While this is up for review, could someone please explain
> again why @Contended should not be a public annotation?

Sorry Doug, I don’t have the answer to your question. I was
not involved in the original @Contended support. Since it
was added in JDK 8, we have some experience with it now,
so  maybe this would help influence any future discussion on
its possible inclusion in Java SE.

The changes I’m proposing here will not prevent any future
inclusion of @Contended in Java SE. I accept that multiple
renaming is not idea, but if this is revised in the JDK 9
timeframe, then the proposed package name will never 
actually surface.

In the interest of making progress on the preparation for
JEP 260, I’d like to proceed with this change.

> Without it, non-JDK concurrent data structures still have
> to use the kinds of non-portable paddings that led us to
> introduce the annotation. See for example JCTools
>  https://github.com/JCTools/JCTools
> and Disruptor
>  http://lmax-exchange.github.io/disruptor/

-Chris.



More information about the hotspot-runtime-dev mailing list