Re: Spin Loop Hint support: Draft JEP proposal

2015-10-05 Thread Ivan Krylov
Is this some kind of CPU.yield() (by analogy to Thread.yield())? I was wondering the same, it feels like a more vague (API abstraction-wise at least) architecture specific Thread.yield(). Paul. Thread.sleep(0), Thread.yield() and now PerformanceHints.spinLoopHint() are all implementation

Re: [9] RFR of 8032027: Add BigInteger square root methods

2015-10-05 Thread Brian Burkhalter
Andrew / Joe, Thank you for the much appreciated comments. On Oct 3, 2015, at 11:45 AM, joe darcy wrote: > For an initial implementation, I think it is acceptable to use a simple > algorithm that is clearly correct. That algorithm can then be replaced with > faster ones

Re: Spin Loop Hint support: Draft JEP proposal

2015-10-05 Thread Gil Tene
> On Oct 5, 2015, at 1:56 AM, Aleksey Shipilev > wrote: > > Hi Gil, > > Glad to see this being addressed! > > On 10/04/2015 07:22 PM, Gil Tene wrote: >> We propose to add a method to the JDK which would be hint that a spin >> loop is being performed. E.g. >>

Re: Spin Loop Hint support: Draft JEP proposal

2015-10-05 Thread Gil Tene
> On Oct 5, 2015, at 2:04 AM, Alan Bateman wrote: > > On 04/10/2015 17:22, Gil Tene wrote: >> I would like to circulate this draft JEP proposal for initial review and >> consensus building purposes. >> >> I'm cross-posting to both core-libs-dev and hotspot-dev. From a

Re: RFR - 8132734: java.util.jar.* changes to support multi-release jar files

2015-10-05 Thread Steve Drach
Hi Alan, > It would be good to add @since to Attributes#MULTI_RELEASE before this goes > in. None of the other attributes have this. Are you suggesting I do this? /** * {@code Name} object for {@code Multi-Release} * manifest attribute that indicates this is a multi-release JAR file. * *

Re: RFR 9: 8138696 : java.lang.ref.Cleaner - an easy to use alternative to finalization

2015-10-05 Thread Roger Riggs
Hi, Building on Peter's code to provide subclassable CleanableReferences, I rearranged the implementation a bit to make it easier to maintain. The CleanableReferences subclasses are nested inside the Cleaner to make the scoping clear. Please review and comment: Webrev:

Re: Spin Loop Hint support: Draft JEP proposal

2015-10-05 Thread Gil Tene
I see SpinLoopHint as very separate from things like MONITOR/WAIT (on x86) and WFE/SEV (on ARM), as well as any other "wait in a nice way until this state changes" instructions that other architectures may have or add. Mechanisms like MONITOR/WAIT and WFE/SEV provide a way to potentially wait

Re: P.S.: RFR [9] 8133651: automated replacing of old-style tags in docs

2015-10-05 Thread Alexander Stepanov
Hello, Could you please review the fix for https://bugs.openjdk.java.net/browse/JDK-8138838 Patch + webrev zipped + specdiff report: http://cr.openjdk.java.net/~avstepan/8138838 Just some cosmetic changes for docs (... -> {@code ...} replacement) + some misprints fixed. Not sure if these

Re: JEP 264: Platform Logging API and Service

2015-10-05 Thread Daniel Fuchs
New JEP Candidate: http://openjdk.java.net/jeps/264 Hi I have uploaded an initial prototype specdiff: http://cr.openjdk.java.net/~dfuchs/8046565/proto.01/specdiff-api/overview-summary.html LoggerFinder methods that take a Class caller argument will take a java.lang.reflect.Module callerModule

[9] RFR 8138838: docs cleanup for java.desktop

2015-10-05 Thread Alexander Stepanov
Sorry; wrong subject... On 10/5/2015 2:12 PM, Alexander Stepanov wrote: Hello, Could you please review the fix for https://bugs.openjdk.java.net/browse/JDK-8138838 Patch + webrev zipped + specdiff report: http://cr.openjdk.java.net/~avstepan/8138838 Just some cosmetic changes for docs (...

Re: [9] Review request JDK-8131334: SAAJ Plugability Layer: using java.util.ServiceLoader

2015-10-05 Thread Miroslav Kos
On 02/10/15 19:36, Georgiy Rakov wrote: On 02.10.2015 18:52, Miroslav Kos wrote: There is an updated version: http://cr.openjdk.java.net/~mkos/8131334/specdiff.07/index.html Two changes: 1) SAAJMetaFactory javadoc - new (self contained) paragraph describing the algorithm for the factory +

Re: [9] Review request JDK-8131334: SAAJ Plugability Layer: using java.util.ServiceLoader

2015-10-05 Thread Georgiy Rakov
On 05.10.2015 14:52, Miroslav Kos wrote: On 02/10/15 19:36, Georgiy Rakov wrote: On 02.10.2015 18:52, Miroslav Kos wrote: There is an updated version: http://cr.openjdk.java.net/~mkos/8131334/specdiff.07/index.html Two changes: 1) SAAJMetaFactory javadoc - new (self contained) paragraph

Re: JEP 264: Platform Logging API and Service

2015-10-05 Thread Roger Riggs
Hi Daniel, This looks good, a few comments... j.l.System: - the behaviors described by the @implNote in getLogger(name) and @implSpec in getLogger(name, resourceBundle) seem like they should be consistent for the two methods. System.Logger: - log(level, throwable, Supplier) - to

Re: Spin Loop Hint support: Draft JEP proposal

2015-10-05 Thread Peter Levart
On 10/05/2015 11:41 AM, Andrew Haley wrote: Hi Gil, On 04/10/15 17:22, Gil Tene wrote: Summary Add an API that would allow Java code to hint that a spin loop is being executed. I don't think this will work for ARM, which has a rather different spinlock mechanism. Instead of PAUSE, we

Re: Spin Loop Hint support: Draft JEP proposal

2015-10-05 Thread Andrew Haley
On 10/05/2015 03:59 PM, Peter Levart wrote: > > On 10/05/2015 11:41 AM, Andrew Haley wrote: >> Hi Gil, >> >> On 04/10/15 17:22, Gil Tene wrote: >> >>> Summary >>> >>> Add an API that would allow Java code to hint that a spin loop is >>> being executed. >> >> I don't think this will work for ARM,

Re: Spin Loop Hint support: Draft JEP proposal

2015-10-05 Thread Ivan Krylov
On 05/10/2015 11:56, Aleksey Shipilev wrote: * I think spinLoopHint() misses a @HotspotIntrinsicCandidate annotation. Thanks, -Aleksey Correct. This prototype was build a little while ago and was based on OpenJDK 9 build 70. This annotation was added as part of

Re: Array equality, comparison and mismatch

2015-10-05 Thread Chris Hegarty
Paul, On 22/09/15 17:30, Paul Sandoz wrote: Hi, Please review the following which adds methods to Arrays for performing equality, comparison and mismatch: https://bugs.openjdk.java.net/browse/JDK-8033148

Re: Spin Loop Hint support: Draft JEP proposal

2015-10-05 Thread Paul Sandoz
> I wonder how Gil's proposed PerformanceHints.spinLoopHint() is to be called. > Just before entering the spin-loop or at each iteration of the loop? The latter, e.g. see the benchmark code. > Is this some kind of CPU.yield() (by analogy to Thread.yield())? > I was wondering the same, it