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

2015-11-23 Thread Chris Hegarty
Given John's comments, and the limitation of -XX:-RestrictContended, adding an additional command line flag, -XaddExports, in 9 to access @CS seems reasonable. I will proceed with this change as is. http://cr.openjdk.java.net/~chegar/8140687/00/ -Chris. On 13/11/15 00:08, John Rose wrote: O

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

2015-11-14 Thread Andrew Haley
On 12/11/15 13:23, Paul Sandoz wrote: > Beyond the JDK and 166 are there any more usages out there in the > wild? It's not much used because most developers aren't even aware of the problem it attempts to ameliorate. But new systems are becoming available with many cores and developers are going

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

2015-11-13 Thread Doug Lea
On 11/12/2015 12:23 PM, Chris Hegarty wrote: It seems a reasonable compromise ( until someone can spend some quality time on it ) to support the sun.misc.Contended annotation as an alias, or similar, along with the internal Contended annotation ( required by java.base ). The changes to support s

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

2015-11-12 Thread Vitaly Davidovich
Thanks John, I understand your position and rationale (Paul actually clarified this along the same lines to me earlier today). I have to admit that this would have to be quite an exotic exploit, but point taken. sent from my phone On Nov 12, 2015 7:08 PM, "John Rose" wrote: > On Nov 12, 2015, a

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

2015-11-12 Thread John Rose
On Nov 12, 2015, at 5:48 AM, Vitaly Davidovich wrote: > >> There is a very valid concern, since @Contended changes object layout and >> increases object size, liberal use might tickle an overflow in HotSpot >> code. Hence why it has remained internal so far. > > > What overflow? OOM of the heap

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

2015-11-12 Thread Doug Lea
On 11/12/2015 08:23 AM, Paul Sandoz wrote: Hi, I don’t think anyone disagrees on the usefulness of @Contended. Beyond the JDK and 166 are there any more usages out there in the wild? My take after browsing through some of these external libraries is that most people still use non-portable (b

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

2015-11-12 Thread Paul Sandoz
> On 12 Nov 2015, at 14:48, Vitaly Davidovich wrote: > > Hi Paul, > > There is a very valid concern, since @Contended changes object layout and > increases object size, liberal use might tickle an overflow in HotSpot code. > Hence why it has remained internal so far. > > What overflow? OOM o

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

2015-11-12 Thread Paul Sandoz
Hi, I don’t think anyone disagrees on the usefulness of @Contended. Beyond the JDK and 166 are there any more usages out there in the wild? I am not aware of any, grepcode does not report any usages outside of the JDK, but we may have missed them. The current set of proposed critical internal A

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

2015-11-12 Thread Chris Hegarty
To me, it sounds like @Contended, in its current form, is not quite ready for prime-time ( inclusion in Java SE 9 ). There is some concern about its implementation, and I’m not sure how the loader restriction, and the control through a -XX flag, would translate into SE spec. There is certainly some

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

2015-11-12 Thread Vitaly Davidovich
You didn't explicitly say that, but it came across like that to me; apologies if I misread. So your concern, then, is that the implementation may not be 100% correct, safe, and robust? If it were more readily available to non-JDK users, you're likely to see more use of it and thus more "coverage"

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

2015-11-12 Thread Vitaly Davidovich
Hi Paul, > There is a very valid concern, since @Contended changes object layout and > increases object size, liberal use might tickle an overflow in HotSpot > code. Hence why it has remained internal so far. What overflow? OOM of the heap? How is that a "very valid" concern? Why would it be us

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

2015-11-12 Thread Fabian Lange
Hi, Without some good argument against it, I think the only issue > is where (what package) to place it. Carrying it out from there seems > identical to your webrev diffs, just changing import statements > and the like. > Doug, as you mention java.util.concurrent. I think that should be the place

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

2015-11-11 Thread Fabian Lange
Hi Chris, I was under the impression that making @Contended Part of Java SE was planned for Java 9, but I might have been mistaken. It is a very useful annotation and I am not aware of issues with it which would justify removing it from public access. We might not be voting on it, but I would lobb

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

2015-11-11 Thread Doug Lea
On 11/11/2015 09:07 AM, Chris Hegarty wrote: So I think the questions we need to answer are as follows: a) Is it desirable to have @Contended as part of Java SE? i) If so, is this doable for JDK 9? b) If ‘No’ to a or i, do we consider @Contended “critical”, as per JEP 260 ? @C

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

2015-11-11 Thread Doug Lea
On 11/11/2015 07:06 AM, Chris Hegarty wrote: 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 orig

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

2015-11-11 Thread Vitaly Davidovich
Chris, I don't know if you (and others) prefer to discuss this here or start a separate thread, but let me just throw in my vote (again) for including @Contended in SE. I'm sure you're well aware of the ugly hacks people resort to for achieving this currently. False sharing is an effect that we

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

2015-11-11 Thread Chris Hegarty
On 11 Nov 2015, at 13:11, Doug Lea wrote: > On 11/11/2015 07:06 AM, Chris Hegarty wrote: > >> 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

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

2015-11-11 Thread Chris Hegarty
On 9 Nov 2015, at 12:49, Doug Lea 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

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

2015-11-09 Thread Vitaly Davidovich
+1000 sent from my phone On Nov 9, 2015 7:49 AM, "Doug Lea" 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 813

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

2015-11-09 Thread Chris Hegarty
On 09/11/15 12:34, Peter Levart wrote: On 11/09/2015 01:32 PM, Peter Levart wrote: On 11/09/2015 11: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

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

2015-11-09 Thread Doug Lea
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

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

2015-11-09 Thread Peter Levart
On 11/09/2015 11: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. ht

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

2015-11-09 Thread Peter Levart
On 11/09/2015 01:32 PM, Peter Levart wrote: On 11/09/2015 11: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

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

2015-11-09 Thread Aleksey Shipilev
On 11/09/2015 01:43 PM, 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 p

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

2015-11-09 Thread Chris Hegarty
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/ C

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

2015-11-02 Thread Aleksey Shipilev
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/ Changes look good to me. But what's t

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

2015-11-02 Thread Alan Bateman
On 01/11/2015 23:56, 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/ -Chris. [1] https://bugs.openjdk.java.net/brow

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

2015-11-02 Thread Paul Sandoz
> On 2 Nov 2015, at 00:56, 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/ > +1 Paul.

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

2015-11-01 Thread Chris Hegarty
> On 2 Nov 2015, at 12:54 a.m., David Holmes wrote: > > Hi Chris, > > hotspot and jdk changes look fine to me. Thanks for looking at this David. -Chris. > Thanks, > David > >> On 2/11/2015 9:56 AM, Chris Hegarty wrote: >> In line with the intended location for other VM annotations, >> see 8

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

2015-11-01 Thread David Holmes
Hi Chris, hotspot and jdk changes look fine to me. Thanks, David On 2/11/2015 9: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/~

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

2015-11-01 Thread Chris Hegarty
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/ -Chris. [1] https://bugs.openjdk.java.net/browse/JDK-8138732