RFR 9: 8078826: Add diagnostic info for java/lang/Runtime/exec/LotsOfOutput.java fails intermittently

2015-04-28 Thread Roger Riggs
Hi Joe, Chris, Thanks for the review and suggestions. I created a new issue for the diagnostic additions, so the original bugid [1] can be used to accumulate additional information. Issue: 8078826 https://bugs.openjdk.java.net/browse/JDK-8078826: Add diagnostic info for

Re: RFR: 8077846: improve locking strategy for readConfiguration(), reset(), and initializeGlobalHandlers()

2015-04-28 Thread Peter Levart
On 04/28/2015 10:13 AM, Daniel Fuchs wrote: On 28/04/15 09:59, Peter Levart wrote: On 04/27/2015 10:05 PM, David Holmes wrote: The patch proposes to use a Reantrant lock to deal with configurations changes in reset() and readConfiguration(), and avoids lock contention in

Re: RFR [9] 8076224: some tidy warning from core libs

2015-04-28 Thread Roger Riggs
Hi Alexander, Thanks for doing this cleanup. Generally, avoiding line breaks of {@link x} across lines makes the source easier to read. Its is ok to re-wrap lines to make the source more readable. Otherwise, it looks fine to me. Thanks, Roger On 4/28/2015 8:22 AM, alexander stepanov

Re: RFR 9: 8078826: Add diagnostic info for java/lang/Runtime/exec/LotsOfOutput.java fails intermittently

2015-04-28 Thread Chris Hegarty
Looks fine to me Roger. -Chris. On 28 Apr 2015, at 14:32, Roger Riggs roger.ri...@oracle.com wrote: Hi Joe, Chris, Thanks for the review and suggestions. I created a new issue for the diagnostic additions, so the original bugid [1] can be used to accumulate additional information.

Re: RFR: 8077846: improve locking strategy for readConfiguration(), reset(), and initializeGlobalHandlers()

2015-04-28 Thread David Holmes
On 28/04/2015 6:13 PM, Daniel Fuchs wrote: On 28/04/15 09:59, Peter Levart wrote: On 04/27/2015 10:05 PM, David Holmes wrote: The patch proposes to use a Reantrant lock to deal with configurations changes in reset() and readConfiguration(), and avoids lock contention in

Re: Additional method on Stream

2015-04-28 Thread Paul Sandoz
Hi Peter, You are correct in stating that flatMap has some overhead. There are optimizations in place for operating on one element and on the head of the stream that reduce the overhead. Escape analysis sometimes works, it would be nice if that were more reliable, and of course similar things

Re: JDK 9 RFR of JDK-8078334: Mark regression tests using randomness

2015-04-28 Thread Joseph D. Darcy
Hello, I'd like to get this changeset, or something close to it, pushed soon so we can start taking advantage of better failure triaging. Any further concerns? Thanks, -Joe On 4/24/2015 11:04 AM, joe darcy wrote: On 4/23/2015 10:58 PM, Alan Bateman wrote: On 24/04/2015 02:54, Joseph D.

flatMap performance was Re: Additional method on Stream

2015-04-28 Thread Paul Sandoz
On Apr 28, 2015, at 12:57 PM, Paul Sandoz paul.san...@oracle.com wrote: Hi Peter, You are correct in stating that flatMap has some overhead. There are optimizations in place for operating on one element and on the head of the stream that reduce the overhead. I believe at least in the

Re: Optional.orElseChain ?

2015-04-28 Thread Paul Sandoz
Hi Remi, Chasing this up. I have not joined the dark-side just yet... but can you log an issue for this? Thanks, Paul. On Apr 20, 2015, at 4:27 PM, Remi Forax fo...@univ-mlv.fr wrote: On 04/20/2015 01:39 PM, Paul Sandoz wrote: Hi Remi, I was gonna propose the same trick you mentioned

RFR [9] 8076224: some tidy warning from core libs

2015-04-28 Thread alexander stepanov
Hello, Could you please review the following fix http://cr.openjdk.java.net/~avstepan/8076224/webrev.00/ for https://bugs.openjdk.java.net/browse/JDK-8076224 Just some HTML cleanup for docs (remove tidy warnings; remove some unnecessary tt tags as they are not supported in HTML5). Thanks,

Re: Additional method on Stream

2015-04-28 Thread Paul Sandoz
On Apr 28, 2015, at 11:18 AM, Stephen Colebourne scolebou...@joda.org wrote: On 27 April 2015 at 16:23, Paul Sandoz paul.san...@oracle.com wrote: One issue is there are zillions of possible more specific convenience operations we could add. Everyone has their own favourite. Some static

Re: [9] RFR of 8078672: Print and allow setting by Java property seeds used to initialize Random instances in java.lang numerics tests

2015-04-28 Thread Brian Burkhalter
On Apr 28, 2015, at 12:57 AM, Chris Hegarty chris.hega...@oracle.com wrote: Perhaps the random number handling should be moved up to somewhere under jdk/test/lib? That would more easily let other type who want to handling random numbers in a uniform way use the library (at the cost of

Re: RFR: 8077846: improve locking strategy for readConfiguration(), reset(), and initializeGlobalHandlers()

2015-04-28 Thread Daniel Fuchs
Hi Peter, On 28/04/15 16:07, Peter Levart wrote: Hi Daniel, There is a synchronized (lock) { ... } syntax too. Using a reentrant lock also offers more possibility for evolutions like try locking or timeout locking - which you can't do with a monitor (unless you reinvent ReentrantLock)...

Re: RFR: 8077846: improve locking strategy for readConfiguration(), reset(), and initializeGlobalHandlers()

2015-04-28 Thread Peter Levart
On 04/28/2015 04:57 PM, Daniel Fuchs wrote: Here's my attempt at simplifying this: http://cr.openjdk.java.net/~plevart/misc/LogManager.synchronization/webrev.01/ LogManager can be subclassed, and subclasses may override reset() for different purposes. So I'm afraid the Cleaner thread

Re: [9] RFR of 8078672: Print and allow setting by Java property seeds used to initialize Random instances in java.lang numerics tests

2015-04-28 Thread Roger Riggs
Hi, Note that there is some existing support for Random (and predetermined) seeds in the Hotspot test library. See hotspot/test/testlibrary/.../Utils.java Soon(ish) to be coming to a testlibrary near you. Roger On 4/28/2015 3:57 AM, Chris Hegarty wrote: On 28 Apr 2015, at 01:44, Brian

Re: RFR [9] 8076224: some tidy warning from core libs

2015-04-28 Thread alexander stepanov
Hello Roger, Thanks! Generally, avoiding line breaks of {@link x} across lines makes the source easier to read. Please see the updated version (no line breaks inside of {@link} tags): http://cr.openjdk.java.net/~avstepan/8076224/webrev.01/ (is that what expected?) Regards, Alexander

Re: RFR [9] 8076224: some tidy warning from core libs

2015-04-28 Thread Roger Riggs
Yes, looks good to me, Thanks, Roger On 4/28/2015 12:09 PM, alexander stepanov wrote: Hello Roger, Thanks! Generally, avoiding line breaks of {@link x} across lines makes the source easier to read. Please see the updated version (no line breaks inside of {@link} tags):

Re: RFR 9: 8078826: Add diagnostic info for java/lang/Runtime/exec/LotsOfOutput.java fails intermittently

2015-04-28 Thread huizhe wang
+1. -Joe On 4/28/2015 6:34 AM, Chris Hegarty wrote: Looks fine to me Roger. -Chris. On 28 Apr 2015, at 14:32, Roger Riggs roger.ri...@oracle.com wrote: Hi Joe, Chris, Thanks for the review and suggestions. I created a new issue for the diagnostic additions, so the original bugid [1] can

Re: RFR [9] 8076224: some tidy warning from core libs

2015-04-28 Thread Lance Andersen
This seems better now :-) On Apr 28, 2015, at 12:09 PM, alexander stepanov alexander.v.stepa...@oracle.com wrote: Hello Roger, Thanks! Generally, avoiding line breaks of {@link x} across lines makes the source easier to read. Please see the updated version (no line breaks

Re: [9] RFR of 8078672: Print and allow setting by Java property seeds used to initialize Random instances in java.lang numerics tests

2015-04-28 Thread Brian Burkhalter
Thanks, Roger, I’ll take a look. Perhaps it might be better to defer this present effort until this happens. Brian On Apr 28, 2015, at 9:46 AM, Roger Riggs roger.ri...@oracle.com wrote: Note that there is some existing support for Random (and predetermined) seeds in the Hotspot test library.

Re: RFR JDK-8029804: (spec) BufferedWriter.write(String, int, int) IndexOutOfBoundsException

2015-04-28 Thread Roger Riggs
Hi Pavel, That looks ok. It would be a bit more comfortable to read and compare with the parent contract if it could use the len 0 phrase. But as written it clearly matches the implementation and is logically equivalent. Roger On 4/27/2015 12:48 PM, Pavel Rappo wrote: Hi everyone,

Re: Additional method on Stream

2015-04-28 Thread Kasper Nielsen
A couple of blog posts with the same issue. http://winterbe.com/posts/2015/03/05/fixing-java-8-stream-gotchas-with-intellij-idea/ http://benjiweber.co.uk/blog/2015/03/06/adding-tolist-to-java-streams/ http://javarevisited.blogspot.dk/2015/03/5-ways-to-convert-java-8-stream-to-list.html It is

Re: [9] RFR of 8078672: Print and allow setting by Java property seeds used to initialize Random instances in java.lang numerics tests

2015-04-28 Thread Chris Hegarty
On 28 Apr 2015, at 01:44, Brian Burkhalter brian.burkhal...@oracle.com wrote: Hi Joe, On Apr 27, 2015, at 5:32 PM, joe darcy joe.da...@oracle.com wrote: The patch looks pretty good. A few questions / comments: The test ParseHexFloatingPoint.java didn't get the (use -Dseed=X to set

Re: RFR 9: 8078582: java/lang/Runtime/exec/LotsOfOutput.java fails intermittently with Process consumes memory

2015-04-28 Thread Chris Hegarty
On 27 Apr 2015, at 21:54, Roger Riggs roger.ri...@oracle.com wrote: Please review adding diagnostic output to identify an intermittent failure. I agree with the adding additional diagnostic output. Maybe the bug description should be updated to indicate that? Webrev:

Re: RFR: 8077846: improve locking strategy for readConfiguration(), reset(), and initializeGlobalHandlers()

2015-04-28 Thread Peter Levart
On 04/27/2015 10:05 PM, David Holmes wrote: The patch proposes to use a Reantrant lock to deal with configurations changes in reset() and readConfiguration(), and avoids lock contention in initializeGlobalHandlers() http://cr.openjdk.java.net/~dfuchs/webrev_8077846/webrev.00/ How early in

Re: RFR: 8077846: improve locking strategy for readConfiguration(), reset(), and initializeGlobalHandlers()

2015-04-28 Thread Daniel Fuchs
On 28/04/15 09:59, Peter Levart wrote: On 04/27/2015 10:05 PM, David Holmes wrote: The patch proposes to use a Reantrant lock to deal with configurations changes in reset() and readConfiguration(), and avoids lock contention in initializeGlobalHandlers()

Re: RFR [9] 8076224: some tidy warning from core libs

2015-04-28 Thread alexander stepanov
thanks! On 28.04.2015 19:25, Lance Andersen wrote: This seems better now :-) On Apr 28, 2015, at 12:09 PM, alexander stepanov alexander.v.stepa...@oracle.com mailto:alexander.v.stepa...@oracle.com wrote: Hello Roger, Thanks! Generally, avoiding line breaks of {@link x} across lines

Re: Additional method on Stream

2015-04-28 Thread Paul Sandoz
On Apr 27, 2015, at 10:34 PM, Kasper Nielsen kaspe...@gmail.com wrote: The other default function I would like to see is stream.toList() (I can live with collectToList) which is short for s.collect(Collectors.toList()). 50 % of my terminal functions are s.collect(Collectors.toList()). Can you

Re: Additional method on Stream

2015-04-28 Thread Stephen Colebourne
On 27 April 2015 at 16:23, Paul Sandoz paul.san...@oracle.com wrote: One issue is there are zillions of possible more specific convenience operations we could add. Everyone has their own favourite. Some static methods were recently added to Stream and Optional in preference to such

Re: Additional method on Stream

2015-04-28 Thread Paul Sandoz
On Apr 28, 2015, at 10:22 AM, Kasper Nielsen kaspe...@gmail.com wrote: On Tue, Apr 28, 2015 at 9:16 AM, Paul Sandoz paul.san...@oracle.com wrote: On Apr 27, 2015, at 10:34 PM, Kasper Nielsen kaspe...@gmail.com wrote: The other default function I would like to see is stream.toList() (I can

sync in share native code

2015-04-28 Thread mikhail cherkasov
Hi there, I need to add synchronization in shared native code, it can't be moved to java side. But for now it's not clear how to make it cross platform. Maybe someone already has similar experience? Furthermore maybe jdk already has a cross platform implementation of mutex in native code?