Re: Unsafe.{get,put}-X-Unaligned; Efficient array comparison intrinsics

2015-03-09 Thread Paul Sandoz
On Mar 9, 2015, at 6:09 PM, Andrew Haley a...@redhat.com wrote: On 03/09/2015 04:59 PM, Paul Sandoz wrote: On Mar 9, 2015, at 5:04 PM, Andrew Haley a...@redhat.com wrote: On 03/09/2015 03:10 PM, Paul Sandoz wrote: Do you want to tackle the single-address access methods as a follow up

Re: JEP 102 Process Updates revised API draft

2015-03-10 Thread Paul Sandoz
On Mar 6, 2015, at 7:58 PM, Roger Riggs roger.ri...@oracle.com wrote: 2) I know there has been a lot of discussion about the use of CF, but I have a few more comments: a) Both onExit and onProcessExit are implemented to unconditionally throw UOE. Is the intention to make

Re: JEP 238: Multi-Version JAR Files

2015-03-10 Thread Paul Sandoz
Sorry for the late reply, getting through email backlogs... On Mar 1, 2015, at 11:41 AM, Florian Weimer fwei...@redhat.com wrote: On 02/27/2015 06:16 PM, Paul Sandoz wrote: On Feb 27, 2015, at 4:47 PM, Florian Weimer fwei...@redhat.com wrote: I really don't think this tooling support

Re: Unsafe.{get,put}-X-Unaligned performance

2015-03-11 Thread Paul Sandoz
Hi Andrew, On Mar 11, 2015, at 6:27 PM, Andrew Haley a...@redhat.com wrote: On 03/11/2015 07:10 AM, John Rose wrote: John: I'm waiting for an answer to my question here before I submit a webrev for approval. http://mail.openjdk.java.net/pipermail/panama-dev/2015-March/99.html

Re: RFR: JDK-8067969 Optimize Stream.count for SIZED Streams

2015-03-12 Thread Paul Sandoz
/ Thanks Paul Sandoz for sponsoring this. This looks good. Code is nicely contained and not as much as i initially anticipated. I am pondering adding an api note to the count methods to head off any suprises as now the stream pipeline may not be executed. * @apiNote * An implementation may

Re: Unsafe.{get,put}-X-Unaligned performance

2015-03-12 Thread Paul Sandoz
On Mar 11, 2015, at 6:27 PM, Andrew Haley a...@redhat.com wrote: On 03/11/2015 07:10 AM, John Rose wrote: John: I'm waiting for an answer to my question here before I submit a webrev for approval. http://mail.openjdk.java.net/pipermail/panama-dev/2015-March/99.html (Answered.)

Re: JEP 102 Process Updates revised API draft

2015-03-10 Thread Paul Sandoz
On Mar 10, 2015, at 3:16 PM, Roger Riggs roger.ri...@oracle.com wrote: On 3/10/2015 5:50 AM, Paul Sandoz wrote: On Mar 6, 2015, at 7:58 PM, Roger Riggs roger.ri...@oracle.com wrote: 2) I know there has been a lot of discussion about the use of CF, but I have a few more comments

Re: RFC: Adding ConcurrentModificationException for HashMap.computeIfAbsent(), and JDK-8071667

2015-03-10 Thread Paul Sandoz
Hi Brent, On the Map.compute* methods. Perhaps we can reuse similar language to that we added for Matcher: The mapping function should not modify this map during computation. This method will, on a best-effort basis, throw a ConcurrentModification if such modification is detected. It's

Re: JEP 102 Process Updates revised API draft

2015-03-11 Thread Paul Sandoz
On Mar 11, 2015, at 11:29 AM, Chris Hegarty chris.hega...@oracle.com wrote: I still think that conflates the OS says no and the Subtype of Process does not support the contract of ProcessHandle. Process as designed feels kind of limited and we are stuck with that. ProcessHandle is then

Re: JEP 102 Process Updates revised API draft

2015-03-11 Thread Paul Sandoz
On Mar 11, 2015, at 12:12 PM, Peter Levart peter.lev...@gmail.com wrote: CFProcess onProcessExit() { ... } // crappy default I don't know. There are two ways to get that behaviour then. Process.onProcessExit() and Process.toHandle().onExit(). If Process is not a subtype of

Re: RFC: Adding ConcurrentModificationException for HashMap.computeIfAbsent(), and JDK-8071667

2015-03-11 Thread Paul Sandoz
On Mar 11, 2015, at 12:34 AM, Brent Christian brent.christ...@oracle.com wrote: Hi, Paul On 3/10/15 8:29 AM, Paul Sandoz wrote: On the Map.compute* methods. Perhaps we can reuse similar language to that we added for Matcher: * The mapping function should not modify this map during

Re: RFR: JDK-8074578 Document memory visibility effects of some Unsafe methods

2015-03-11 Thread Paul Sandoz
On Mar 10, 2015, at 8:06 PM, Martin Buchholz marti...@google.com wrote: I agree with Andrew that the Unsafe API matters, and there are many implementations of it (even multiple within openjdk itself!). I still know of no reason why my proposed spec is wrong. If C11 support was good and

Re: JDK 9 RFR of JDK-8075111: Mark testFlatMappingClose (from CollectorsTest) as serialization hostile

2015-03-13 Thread Paul Sandoz
On Mar 13, 2015, at 11:34 AM, Amy Lu amy...@oracle.com wrote: Testcase testFlatMappingClose was newly introduced in JDK-8071600 in CollectorsTest, this test should be marked as serialization-hostile (such tests will ignored by by lambda serialization testing framework). bug:

Re: RFR: JDK-8067969 Optimize Stream.count for SIZED Streams

2015-03-12 Thread Paul Sandoz
On Mar 12, 2015, at 1:07 PM, Chris Hegarty chris.hega...@oracle.com wrote: I am pondering adding an api note to the count methods to head off any suprises as now the stream pipeline may not be executed. I think it would be good to add a note to the spec, as this could be surprising.

Re: Unsafe.{get,put}-X-Unaligned performance

2015-03-12 Thread Paul Sandoz
On Mar 11, 2015, at 7:23 PM, Andrew Haley a...@redhat.com wrote: On 03/11/2015 06:00 PM, Paul Sandoz wrote: We need to include some unit tests before we can push. I have a test which I've been using. It could be converted into a unit test. Ok. There are Unsafe tests in: hotspot/test

Re: RFR: JDK-8067969 Optimize Stream.count for SIZED Streams

2015-03-12 Thread Paul Sandoz
On Mar 12, 2015, at 12:05 PM, Chris Hegarty chris.hega...@oracle.com wrote: On 12 Mar 2015, at 09:44, Paul Sandoz paul.san...@oracle.com wrote: On Mar 11, 2015, at 1:45 PM, Aggelos Biboudis bibou...@gmail.com wrote: Hi all, Please review the patch for the count terminal operator

Re: JEP 102 Process Updates revised API draft

2015-03-12 Thread Paul Sandoz
On Mar 10, 2015, at 4:41 PM, Roger Riggs roger.ri...@oracle.com wrote: Hi Paul, On 3/10/2015 11:22 AM, Paul Sandoz wrote: Any sub-type of Process that does not override getPid will essentially result in that USO being propagated to many ProcessHandle methods that depend on the PID

Re: [9] RFC on 8074467: In some cases, BigDecimal's toBigInteger() produces wrong result

2015-03-23 Thread Paul Sandoz
Hi Brian, This seems like a Cannot Reproduce (the description is fuzzy about what versions of the JDK this previously worked on), and request further info. You might want to check 8u20 and/or 8u31 (which is the version marked in the bug), rather than 8u40, just to double check if something was

Re: RFR 8071667 : HashMap.computeIfAbsent() adds entry that HashMap.get() does not find.

2015-03-23 Thread Paul Sandoz
On Mar 23, 2015, at 12:16 PM, Chris Hegarty chris.hega...@oracle.com wrote: I wonder if we, optionally, pass the exception type, either CME or IAE, could we add CHM to the DataProvider? Possibly, but I suspect any tests for CHM will be more fragile and involved. My sense is it may be

Re: RFR(s): 8073923: Files.lines() documentation needs clarification

2015-03-03 Thread Paul Sandoz
On Mar 3, 2015, at 3:43 AM, Stuart Marks stuart.ma...@oracle.com wrote: Hi Joe, Oh yes, good point. Revised webrev: http://cr.openjdk.java.net/~smarks/reviews/8073923/webrev.1/ +1 Paul.

Re: JEP 238: Multi-Version JAR Files

2015-03-02 Thread Paul Sandoz
Hi Moh, On Feb 27, 2015, at 7:23 PM, Rezaei, Mohammad A. mohammad.rez...@gs.com wrote: Why do you expect the new classes in the JDK not to be part of the API? An MVJAR is one unit of release. Should it have two or more public APIs? if so what is it's version and set of dependencies? Can it be

Re: RFR 8071479: Stream and lamdification improvements to j.u.regex.Matcher

2015-03-02 Thread Paul Sandoz
On Feb 28, 2015, at 4:40 AM, Xueming Shen xueming.s...@oracle.com wrote: Updated to a static private class for the toMatchResult(). Added a private field MatchResult for the anonymous MatchResult wrapper.

Re: RFR 8071479: Stream and lamdification improvements to j.u.regex.Matcher

2015-02-27 Thread Paul Sandoz
Hi, On Feb 13, 2015, at 8:26 PM, Stuart Marks stuart.ma...@oracle.com wrote: OK, this looks great. Thanks for the updates. There is also in same order - in the same order in the doc for the results() method, as Brian pointed out internally. No need for another webrev. Alas

Re: JEP 238: Multi-Version JAR Files

2015-02-27 Thread Paul Sandoz
On Feb 27, 2015, at 4:47 PM, Florian Weimer fwei...@redhat.com wrote: I really don't think this tooling support will provide sufficient enticement to developers to maintain separate 7/8/9 source branches of their libraries. Isn't that the main obstacle, and not the way the bits are delivered?

Re: JEP 238: Multi-Version JAR Files

2015-02-27 Thread Paul Sandoz
On Feb 27, 2015, at 2:27 PM, Florian Weimer fwei...@redhat.com wrote: On 02/12/2015 09:52 PM, Paul Sandoz wrote: Hi In connection with the JEP there is also a design document to help the discussion: http://cr.openjdk.java.net/~psandoz/jdk9/MultiVersionJar-8u60-9-design.md We

Re: RFR 8071479: Stream and lamdification improvements to j.u.regex.Matcher

2015-02-27 Thread Paul Sandoz
On Feb 27, 2015, at 7:48 PM, Xueming Shen xueming.s...@oracle.com wrote: On 02/27/2015 10:34 AM, Paul Sandoz wrote: On Feb 27, 2015, at 7:18 PM, Xueming Shenxueming.s...@oracle.com wrote: Hi Paul, 1133 * @param replacer 1134 * The function to be applied to the match

Re: RFR 8071479: Stream and lamdification improvements to j.u.regex.Matcher

2015-02-27 Thread Paul Sandoz
On Feb 27, 2015, at 7:18 PM, Xueming Shen xueming.s...@oracle.com wrote: Hi Paul, 1133 * @param replacer 1134 * The function to be applied to the match result of this matcher 1135 * that returns a replacement string. 1136 * 1137 *p The

Re: JEP 238: Multi-Version JAR Files

2015-02-27 Thread Paul Sandoz
On Feb 26, 2015, at 5:02 PM, Paul Sandoz paul.san...@oracle.com wrote: Hi, If anyone wants to give this a test drive see stuff in here: http://cr.openjdk.java.net/~psandoz/multiversion-jar/ produced by Steve (CC'ed) who has done all the development. Another correction, CC'ing Steve

Re: RFR JDK-8073924: Update test/java/nio/charset/Charset/NIOCharsetAvailability.java to work with module system

2015-02-27 Thread Paul Sandoz
On Feb 26, 2015, at 11:33 PM, Alan Bateman alan.bate...@oracle.com wrote: On 26/02/2015 22:09, Xueming Shen wrote: thanks! webrev has been updated accordingly. http://cr.openjdk.java.net/~sherman/8073924/webrev We could probably improve it further but what you have is good and not worth

Re: RFR [9]: default Serialization should issue a fence after reconstructing an Object with final fields

2015-02-27 Thread Paul Sandoz
On Feb 26, 2015, at 12:38 PM, Chris Hegarty chris.hega...@oracle.com wrote: On 24 Feb 2015, at 15:07, Chris Hegarty chris.hega...@oracle.com wrote: On 24 Feb 2015, at 11:45, Peter Levart peter.lev...@gmail.com wrote: ... That's better now. Let me just try to measure the overhead of

Re: JEP 238: Multi-Version JAR Files

2015-02-27 Thread Paul Sandoz
On Feb 27, 2015, at 9:00 AM, Paul Sandoz paul.san...@oracle.com wrote: On Feb 26, 2015, at 5:02 PM, Paul Sandoz paul.san...@oracle.com wrote: Hi, If anyone wants to give this a test drive see stuff in here: http://cr.openjdk.java.net/~psandoz/multiversion-jar/ produced by Steve

Re: Time to remove deprecated Runtime.getLocalizedInput/OutputStream methods?

2015-02-27 Thread Paul Sandoz
On Feb 23, 2015, at 5:57 PM, Roger Riggs roger.ri...@oracle.com wrote: Hi, I propose to remove two methods; they have been deprecated for more than a decade, do not seem to be in use anywhere, and have degenerate implementations. java.lang.Runtime.getLocalizedInputStream(InputStream

Re: Unsafe.{get,put}-X-Unaligned; Efficient array comparison intrinsics

2015-03-04 Thread Paul Sandoz
On Mar 4, 2015, at 4:35 PM, Andrew Haley a...@redhat.com wrote: On 03/04/2015 03:07 PM, Paul Sandoz wrote: If so then presumably that would be applicable to both get* and set*? I think so. Could those boolean accepting methods be intrinsified or would they always be Java only

Re: Unsafe.{get,put}-X-Unaligned; Efficient array comparison intrinsics

2015-03-04 Thread Paul Sandoz
On Mar 4, 2015, at 3:29 PM, Andrew Haley a...@redhat.com wrote: On 03/04/2015 02:15 PM, Paul Sandoz wrote: The flag UseUnalignedAccesses feels a little awkward. IIUC it seems to be acting as two things, a flag signalling an unaligned architecture and a developer option to disable/enable

Re: Unsafe.{get,put}-X-Unaligned; Efficient array comparison intrinsics

2015-03-04 Thread Paul Sandoz
On Mar 2, 2015, at 8:30 PM, Andrew Haley a...@redhat.com wrote: On 02/25/2015 04:43 PM, Andrew Haley wrote: On 02/24/2015 11:18 PM, John Rose wrote: My bottom line: I think we should use the internal HotSpot API bytes.hpp by surfacing relevant parts of it up into Unsafe. I have done this

Re: [9] RFR (XS): 8073644: Assertion in LambdaFormEditor.bindArgumentType is too strict

2015-02-27 Thread Paul Sandoz
On Feb 26, 2015, at 7:14 PM, Vladimir Ivanov vladimir.x.iva...@oracle.com wrote: http://cr.openjdk.java.net/~vlivanov/8073644/webrev.00 https://bugs.openjdk.java.net/browse/JDK-8073644 After JDK-8069591 [1] which introduced LambdaForm customization, the assert in

Re: RFR 8071479: Stream and lamdification improvements to j.u.regex.Matcher

2015-03-03 Thread Paul Sandoz
On Mar 3, 2015, at 3:09 AM, Stuart Marks stuart.ma...@oracle.com wrote: On 3/2/15 1:49 AM, Paul Sandoz wrote: On Feb 28, 2015, at 4:40 AM, Xueming Shen xueming.s...@oracle.com wrote: Updated to a static private class for the toMatchResult(). Added a private field MatchResult

Re: RFR [9]: default Serialization should issue a fence after reconstructing an Object with final fields

2015-02-23 Thread Paul Sandoz
On Feb 23, 2015, at 4:40 PM, Chris Hegarty chris.hega...@oracle.com wrote: On 23/02/15 15:30, Vitaly Davidovich wrote: Ok Chris, sounds good. It could be, but I omitted it as it requires a pesky explicit assignment of false in the case where there are not final fields! You could

Re: RFR 8071600: Add a flat-mapping collector

2015-02-25 Thread Paul Sandoz
On Feb 12, 2015, at 5:07 PM, Paul Sandoz paul.san...@oracle.com wrote: On Feb 12, 2015, at 4:51 PM, Peter Levart peter.lev...@gmail.com wrote: Hi Paul, Would the following optimization make any sense? public static T, U, A, R CollectorT, ?, R flatMapping(Function? super T

Re: RFR 8073056: Repeating annotations throws java.security.AccessControlException with a SecurityManager

2015-02-25 Thread Paul Sandoz
On Feb 25, 2015, at 12:59 PM, Joel Borggrén-Franck joel.fra...@oracle.com wrote: Hi Paul, Yes that would indeed be possible, but after some internal discussions we though it safer to reuse the Proxy invocation path. Ok, i claim ignorance as to why that is so :-) Is there any

Re: Unsafe.{get,put}-X-Unaligned; Efficient array comparison intrinsics

2015-02-25 Thread Paul Sandoz
On Feb 25, 2015, at 12:47 PM, Andrew Haley a...@redhat.com wrote: On 02/25/2015 11:26 AM, Paul Sandoz wrote: I think it simpler just to have one method with a boolean parameter whose default false value means native and true means BigEndian. Otherwise, even simpler, just support native

Re: JEP 238: Multi-Version JAR Files

2015-02-25 Thread Paul Sandoz
On Feb 12, 2015, at 11:59 PM, Stephen Colebourne scolebou...@joda.org wrote: Interesting direction. Catching up on email after being away last week... Reading carefully, the goal is actually very limited in scope, by preventing any public API changes. It doesn't help adoption of JSR-310

Re: RFR 8014678: Spurious AccessControlException thrown in java.lang.Class.getEnclosingMethod()

2015-02-25 Thread Paul Sandoz
Hi, Looks ok to me. Paul. On Feb 24, 2015, at 12:26 PM, Joel Borggrén-Franck joel.fra...@oracle.com wrote: Hi, Here is a fix for an old issue with Class.getEnclosingMethod() and Class.getEnclosingConstructor(). The problem is that we throw a spurious AccessControlException in some

Re: JEP 238: Multi-Version JAR Files

2015-02-25 Thread Paul Sandoz
HI Peter, On Feb 14, 2015, at 3:56 PM, Peter Levart peter.lev...@gmail.com wrote: Hi Paul, I read through the proposal and couldn't find an explanation of how resources placed in versioned paths are going to be visible. For example, if the multi-versioned jar contains the following

Re: JEP 238: Multi-Version JAR Files

2015-02-25 Thread Paul Sandoz
Hi Peter, On Feb 14, 2015, at 8:54 PM, Peter Levart peter.lev...@gmail.com wrote: On 02/12/2015 09:52 PM, Paul Sandoz wrote: Hi In connection with the JEP there is also a design document to help the discussion: http://cr.openjdk.java.net/~psandoz/jdk9/MultiVersionJar-8u60-9

Re: JEP 238: Multi-Version JAR Files

2015-02-25 Thread Paul Sandoz
On Feb 25, 2015, at 6:45 PM, Stephen Colebourne scolebou...@joda.org wrote: On 25 February 2015 at 13:30, Paul Sandoz paul.san...@oracle.com wrote: Even in the modular world i will expect class scanning will be used. While we can now iterate reliably over classes in the image i don't believe

Re: JEP 238: Multi-Version JAR Files

2015-02-25 Thread Paul Sandoz
On Feb 25, 2015, at 5:27 PM, Brian Goetz brian.go...@oracle.com wrote: On 2/12/2015 5:59 PM, Stephen Colebourne wrote: Interesting direction. Reading carefully, the goal is actually very limited in scope, by preventing any public API changes. It doesn't help adoption of JSR-310 for

Re: RFR [9]: default Serialization should issue a fence after reconstructing an Object with final fields

2015-02-24 Thread Paul Sandoz
On Feb 23, 2015, at 10:08 PM, Peter Levart peter.lev...@gmail.com wrote: - We have to be careful with loosening of volatile writes to final fields in custom readObject() methods (BigDecimal.intCompact for example) especialy if they are writes to fields that are not serial fields in

Re: Unsafe.{get,put}-X-Unaligned; Efficient array comparison intrinsics

2015-02-24 Thread Paul Sandoz
On Feb 24, 2015, at 3:59 PM, Andrew Haley a...@redhat.com wrote: If we expose the endianness query via a new method in unsafe we should reuse that in java.nio.Bits and get rid of the associated static code block. Sure, I already did that. Locally i guess? (just in case i missed

Re: Unsafe.{get,put}-X-Unaligned; Efficient array comparison intrinsics

2015-02-24 Thread Paul Sandoz
On Feb 24, 2015, at 2:48 PM, Andrew Haley a...@redhat.com wrote: I am all for keeping more code in Java if we can. I don't know enough about assembler-based optimizations to determine if it might be possible to do better on certain CPU architectures. Me either, but I have tested this on

Re: JEP 238: Multi-Version JAR Files

2015-02-26 Thread Paul Sandoz
On Feb 26, 2015, at 5:02 PM, Paul Sandoz paul.san...@oracle.com wrote: Hi, If anyone wants to give this a test drive see stuff in here: http://cr.openjdk.java.net/~psandoz/multiversion-jar/ produced by Steve (CC'ed) who has done all the development. For example: multiversion

Re: JEP 238: Multi-Version JAR Files

2015-02-26 Thread Paul Sandoz
/p:URLClassPath.jar -jar version.jar I am running on version 9 Paul. On Feb 12, 2015, at 9:52 PM, Paul Sandoz paul.san...@oracle.com wrote: Hi In connection with the JEP there is also a design document to help the discussion: http://cr.openjdk.java.net/~psandoz/jdk9/MultiVersionJar-8u60-9-design.md

Re: Unsafe.{get,put}-X-Unaligned; Efficient array comparison intrinsics

2015-02-25 Thread Paul Sandoz
On Feb 25, 2015, at 12:20 AM, John Rose john.r.r...@oracle.com wrote: On Feb 24, 2015, at 7:49 AM, Andrew Haley a...@redhat.com wrote: There will be only one runtime Unsafe sub-type ever observed in a particular VM. Oh, that's very nice. That doesn't help with B accesses on L

Re: Unsafe.{get,put}-X-Unaligned; Efficient array comparison intrinsics

2015-02-25 Thread Paul Sandoz
On Feb 25, 2015, at 11:03 AM, Peter Levart peter.lev...@gmail.com wrote: On 02/25/2015 09:27 AM, Paul Sandoz wrote: On Feb 25, 2015, at 12:20 AM, John Rose john.r.r...@oracle.com wrote: On Feb 24, 2015, at 7:49 AM, Andrew Haley a...@redhat.com wrote: There will be only one

Re: RFR 8075307 Pipeline calculating inconsistent flag state for parallel stateful ops

2015-03-24 Thread Paul Sandoz
Hi Stuart, Many thanks for looking at this gnarly code. On Mar 24, 2015, at 2:41 AM, Stuart Marks stuart.ma...@oracle.com wrote: Hi Paul, After reading your notes here, and in the bug reports, and the comments in the code, and banging my head against the code (before and after) for a

Re: RFR: JDK-8074578 Document memory visibility effects of some Unsafe methods

2015-03-24 Thread Paul Sandoz
On Mar 24, 2015, at 12:27 AM, John Rose john.r.r...@oracle.com wrote: Meanwhile, Paul Sandoz is working to refactor these aspects, creating a large chunk of API that will be public, portable, and secure. You've got to sympathize with him for not wanting to run through all the inevitable

Re: [9] RFR (XS): 8059455: LambdaForm.prepare() does unnecessary work for cached LambdaForms

2015-04-23 Thread Paul Sandoz
On Apr 23, 2015, at 5:12 PM, Vladimir Ivanov vladimir.x.iva...@oracle.com wrote: https://bugs.openjdk.java.net/browse/JDK-8059455 http://cr.openjdk.java.net/~vlivanov/8059455/webrev.00/ LambdaForm.compileToBytecode() does unnecessary work (constructs invokerType check an assertion)

Re: RFR 9: 8077350 Process API Updates Implementation Review (Due 4/23)

2015-04-21 Thread Paul Sandoz
On Apr 21, 2015, at 2:57 PM, Roger Riggs roger.ri...@oracle.com wrote: Hi Paul, On 4/21/2015 8:29 AM, Paul Sandoz wrote: There are statements in Process about the specified behavior of Processes created by ProcessBuilder. That's why I included them in the @implSpec clause. If @implSpec

Re: RFR 9: 8077350 Process API Updates Implementation Review (Due 4/23)

2015-04-20 Thread Paul Sandoz
Hi Roger, I am not sure you have the @implSpec/@implNote quite correct on the new methods of Process. For example, for Process.toHandle i would expect something like: ... @implSpec This implementation throws an instance of UnsupportedOperationException and performs no other action.

Re: Optional.orElseChain ?

2015-04-20 Thread Paul Sandoz
Hi Remi, I was gonna propose the same trick you mentioned in your last email :-) Similar tricks are possible for other cases like an equivalent of the recently added ifPresentOrElse, but that was considered a little obtuse. On Apr 17, 2015, at 11:37 PM, Remi Forax fo...@univ-mlv.fr wrote:

RFR 8078490: Missed submissions in ForkJoinPool

2015-04-23 Thread Paul Sandoz
Hi. Please review this patch from Doug that fixes an issue where a submitted task to a f/j pool never gets executed. http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8078490-fj-missed-submissions/webrev/ I already counted myself and Alexey as reviewers. The issue manifests itself under certain

Re: RFR 8078490: Missed submissions in ForkJoinPool

2015-04-23 Thread Paul Sandoz
On Apr 23, 2015, at 3:23 PM, Chris Hegarty chris.hega...@oracle.com wrote: Thanks for bringing this in Paul. The change looks ok to me, and suitable for backport. Trivially, the test does not need the Classpath exception in its license header. Doh, thanks, updated locally. When i

Re: RFR 9: 8077350 Process API Updates Implementation Review (Due 4/23)

2015-04-20 Thread Paul Sandoz
On Apr 20, 2015, at 5:49 PM, Roger Riggs roger.ri...@oracle.com wrote: Hi Paul, On 4/20/2015 9:01 AM, Paul Sandoz wrote: Hi Roger, I am not sure you have the @implSpec/@implNote quite correct on the new methods of Process. For example, for Process.toHandle i would expect something

Re: RFR 9: 8077350 Process API Updates Implementation Review (Due 4/23)

2015-04-20 Thread Paul Sandoz
doc of Process and or ProcessBuilder about the behaviour of such Process instances? It would seem to flow from the general statement you added to Process about overriding. Paul. Thanks, Roger On 4/20/2015 12:33 PM, Paul Sandoz wrote: On Apr 20, 2015, at 5:49 PM, Roger Riggs roger.ri

Re: Patch to improve primitives Array.sort()

2015-04-24 Thread Paul Sandoz
HI Chan, Attachments might be getting removed by the OpenJDK email server. If you send me the webrev privately i can upload to cr. If so could you do that please send the JMH tests as i think people might also be interested in those. Paul. On Apr 24, 2015, at 9:17 AM, Chan, Sunny

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

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

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

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: Additional method on Stream

2015-04-27 Thread Paul Sandoz
Hi Stephen, You can do this: static T FunctionObject, StreamT casting(ClassT c) { // bike shed for clearer name return o - Stream.ofNullable(c.isInstance(o) ? c.cast(o) : null); } Object[] s = Stream.of(1, 2, 3, 4).toArray(); Stream.of(s).flatMap(casting(Integer.class)).

Re: Additional method on Stream

2015-04-27 Thread Paul Sandoz
On Apr 27, 2015, at 4:56 PM, Stephen Colebourne scolebou...@joda.org wrote: Obviously, this is yet another possible workaround. But it is a workaround. I don't consider it just a workaround :-) There really aren't that many rough edges with the set of methods added with lambdas, but this is

RFR 8078645: removeIf(filter) in ConcurrentHashMap removes entries for which filter is false

2015-05-04 Thread Paul Sandoz
Hi Please review: http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8078645-ConcurrentMap-views-removeIf/webrev/ These updates are already in the 166 repo. The documentation update to the class of ConcurrentMap is going through CCC. I took the liberty of also cleaning up some smaller doc errors

Re: RFR 8078645: removeIf(filter) in ConcurrentHashMap removes entries for which filter is false

2015-05-04 Thread Paul Sandoz
On May 4, 2015, at 7:12 PM, Martin Buchholz marti...@google.com wrote: Thanks, Paul. Are there are too many cooks spoiling this broth? Probably :-) There are still a number of differences, mostly cosmetic, between your version of ConcurrentMap.java and jsr166 CVS (let's try hard to

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 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

Re: RFR 8078645: removeIf(filter) in ConcurrentHashMap removes entries for which filter is false

2015-05-06 Thread Paul Sandoz
On May 5, 2015, at 7:39 PM, Martin Buchholz marti...@google.com wrote: I'd prefer to go the other way, deleting those trivial methods entirely, utilizing the rarely used .new syntax. Very good, even better! Paul.

Re: Add Predicate.of(), Consumer.of(), etc.

2015-05-06 Thread Paul Sandoz
On May 2, 2015, at 11:31 PM, Remi Forax fo...@univ-mlv.fr wrote: Hi all, today, I stubble on a variant of JDK-8050818 [1], trying to call negate() on a lambda which is not yet a Predicate (due to target typing) which requires either to cast the lambda to a Predicate and everybody knows

Re: Add Predicate.of(), Consumer.of(), etc.

2015-05-06 Thread Paul Sandoz
On May 6, 2015, at 1:58 PM, Attila Szegedi attila.szeg...@oracle.com wrote: On May 6, 2015, at 12:37 PM, Paul Sandoz paul.san...@oracle.com wrote: On May 2, 2015, at 11:31 PM, Remi Forax fo...@univ-mlv.fr wrote: Hi all, today, I stubble on a variant of JDK-8050818 [1], trying to call

Re: RFR: 8079136: Accessing a nested sublist leads to StackOverflowError

2015-05-06 Thread Paul Sandoz
On May 6, 2015, at 4:08 PM, Ivan Gerasimov ivan.gerasi...@oracle.com wrote: Hello everyone! Here's the second iteration of the fix. BUGURL: https://bugs.openjdk.java.net/browse/JDK-8079136 WEBREV: http://cr.openjdk.java.net/~igerasim/8079136/1/webrev/ This is cleaner. For extra bonus

Re: RFR: 8079136: Accessing a nested sublist leads to StackOverflowError

2015-05-07 Thread Paul Sandoz
On May 7, 2015, at 1:23 AM, Martin Buchholz marti...@google.com wrote: Hi Ivan, I'm afraid of these changes - they are hard to review. Can't we fix the SOE with a relatively small change to ArrayList.SubList methods that recursively invoke parent methods to use iteration instead, Since

Re: RFR: 8079136: Accessing a nested sublist leads to StackOverflowError

2015-05-05 Thread Paul Sandoz
Hi Ivan, ArrayList -- You can simplify SubList with: private final class SubList extends AbstractListE implements RandomAccess { private final SubList parent; private final int offset; int size; // Top level sub-list SubList(int offset, int fromIndex, int toIndex) {

Re: RFR 8078645: removeIf(filter) in ConcurrentHashMap removes entries for which filter is false

2015-05-04 Thread Paul Sandoz
On May 4, 2015, at 7:29 PM, Paul Sandoz paul.san...@oracle.com wrote: There are still a number of differences, mostly cosmetic, between your version of ConcurrentMap.java and jsr166 CVS (let's try hard to keep that the master copy). Yeah, there are a bunch of cosmetic differences, i just

Re: RFR 8078645: removeIf(filter) in ConcurrentHashMap removes entries for which filter is false

2015-05-05 Thread Paul Sandoz
On May 4, 2015, at 11:11 PM, Martin Buchholz marti...@google.com wrote: Paul, thanks. Looks good. Test uses some impressive machinery, but I like what we did in jsr166 tck tests for similar sorts of tests: - rename latch to done - rename barrier to threadsStarted - rename map to

Re: RFR 8078645: removeIf(filter) in ConcurrentHashMap removes entries for which filter is false

2015-05-05 Thread Paul Sandoz
On May 5, 2015, at 7:54 AM, Martin Buchholz marti...@google.com wrote: One query in ConcurrentSkipListMap, we have: 2500 // else use iterator 2501 @SuppressWarnings(unchecked) IteratorMap.EntryObject,E it = 2502

Re: RFR 8029891 : Deadlock detected in java/lang/ClassLoader/deadlock/GetResource.java

2015-05-13 Thread Paul Sandoz
On May 12, 2015, at 10:49 PM, Mandy Chung mandy.ch...@oracle.com wrote: Ah, I understand Mandy now. You are talking about using special Properties implementation just for system properties. Unfortunately, this is currently valid code: Properties props = new Properties(); ...

Re: [9] RFR (M): 8079205: CallSite dependency tracking is broken after sun.misc.Cleaner became automatically cleared

2015-05-13 Thread Paul Sandoz
Hi Vladimir, I am not an export in the HS area but the code mostly made sense to me. I also like Peter's suggestion of Context implementing Runnable. Some minor comments. CallSite.java: 145 private final long dependencies = 0; // Used by JVM to store JVM_nmethodBucket* It's a

Re: RFR: 8079459: JCK test api/java_nio/ByteBuffer/index.html#GetPutXXX start failing after JDK-8026049

2015-05-11 Thread Paul Sandoz
On May 11, 2015, at 4:14 PM, Andrew Haley a...@redhat.com wrote: I mixed up my nextPutIndex and nextGetIndex. Sorry. http://cr.openjdk.java.net/~aph/8079459/ This is also the cause of Bug https://bugs.openjdk.java.net/browse/JDK-8079860 Oops, i missed this in review. Looks good.

Re: [9] RFR (M): 8079205: CallSite dependency tracking is broken after sun.misc.Cleaner became automatically cleared

2015-05-13 Thread Paul Sandoz
On May 13, 2015, at 1:59 PM, Vladimir Ivanov vladimir.x.iva...@oracle.com wrote: Peter, Paul, thanks for the feedback! Updated the webrev in place: http://cr.openjdk.java.net/~vlivanov/8079205/webrev.02 +1 I am not an export in the HS area but the code mostly made sense to me. I

Re: PriorityQueue

2015-05-16 Thread Paul Sandoz
On May 15, 2015, at 4:04 PM, Chris Hegarty chris.hega...@oracle.com wrote: And/Or should PriorityQueue override addAll and provide a more performant implementation for common Collection types ( just like the constructor )? It should be possible to improve this case too: create a new array,

Re: PriorityQueue

2015-05-15 Thread Paul Sandoz
On May 15, 2015, at 3:20 PM, Vitaly Davidovich vita...@gmail.com wrote: Paul, I don't think you're missing anything obvious (unless I am as well :)). What you wrote is basically what I meant by creating static helper method in Brett's own code that does exactly what you wrote. The

Re: RFR: 8079459: JCK test api/java_nio/ByteBuffer/index.html#GetPutXXX start failing after JDK-8026049

2015-05-15 Thread Paul Sandoz
On May 15, 2015, at 9:41 AM, Alan Bateman alan.bate...@oracle.com wrote: On 14/05/2015 14:40, Andrew Haley wrote: : Fix: http://cr.openjdk.java.net/~aph/8079459-3-jdk/ Testcase: http://cr.openjdk.java.net/~aph/8079459-3-hs/ This looks good to me. Saem here, Paul.

Re: PriorityQueue

2015-05-15 Thread Paul Sandoz
On May 14, 2015, at 8:17 AM, Brett Bernstein brett.bernst...@gmail.com wrote: I believe the linked sequence of messages refer to the addition of a PriorityQueue constructor only taking a Comparator which was does appear in Java 1.8. Did you have a link to something regarding the a

Re: Patch to improve primitives Array.sort()

2015-05-15 Thread Paul Sandoz
On May 15, 2015, at 11:48 AM, Chan, Sunny sunny.c...@gs.com wrote: I have provided Paul with an updated patch: Here it is: http://cr.openjdk.java.net/~psandoz/tmp/gs/sort/webrev.1/ In DualPivotQuicksort 63 /** 64 * The maximum length of run in merge sort. 65 */ 66

Re: RFR 9: 8077350 Process API Updates Implementation Review

2015-05-18 Thread Paul Sandoz
Ho Roger, I mostly focused on the specification. Paul. Process -- 35 * {@code Process} provides control of native processes started by 36 * ProcessBuilder.start and Runtime.exec. Link to those methods? 92 /** 93 * Default constructor for Process. 94 */ 95

Re: RFR 8072853: SimpleScriptContext used by NashornScriptEngine doesn't completely complies to the spec regarding exception throwing

2015-05-18 Thread Paul Sandoz
On May 18, 2015, at 2:59 PM, A. Sundararajan sundararajan.athijegannat...@oracle.com wrote: Thanks for the review. Updated test as per your suggestion. Uploaded fresh review @ http://cr.openjdk.java.net/~sundar/8072853/webrev.01/ +1 Paul.

Re: RFR 8072853: SimpleScriptContext used by NashornScriptEngine doesn't completely complies to the spec regarding exception throwing

2015-05-18 Thread Paul Sandoz
On May 18, 2015, at 12:44 PM, A. Sundararajan sundararajan.athijegannat...@oracle.com wrote: Please review http://cr.openjdk.java.net/~sundar/8072853/webrev.00/ for https://bugs.openjdk.java.net/browse/JDK-8072853 Changes to SimpleScriptContext look good. Test-wise you could reduce the

Re: RFR 9: 8077350 Process API Updates Implementation Review

2015-05-18 Thread Paul Sandoz
On May 18, 2015, at 10:49 PM, Roger Riggs roger.ri...@oracle.com wrote: Hi Paul, Thanks for the comments. On 5/18/2015 7:58 AM, Paul Sandoz wrote: Ho Roger, I mostly focused on the specification. Paul. Process -- 35 * {@code Process} provides control of native processes

Re: RFR(s): 8072726: add adapter to convert Enumeration to Iterator

2015-05-19 Thread Paul Sandoz
On May 19, 2015, at 12:45 AM, Stuart Marks stuart.ma...@oracle.com wrote: On 5/18/15 3:20 AM, Paul Sandoz wrote: I would like to suggest some tweaks to the specification to get across this method is transitioning control of traversal from enumeration to iterator. How about: Returns

Re: RFR (XXS) 8080535: (ch) Expected size of Character.UnicodeBlock.map is not optimal

2015-05-19 Thread Paul Sandoz
On May 18, 2015, at 8:52 PM, Martin Buchholz marti...@google.com wrote: On Fri, May 15, 2015 at 5:59 PM, Ivan Gerasimov ivan.gerasi...@oracle.com wrote: On 16.05.2015 2:18, Martin Buchholz wrote: I wouldn't bother defining the constant. I only need it in the regression test, to

Re: RFR(s): 8072726: add adapter to convert Enumeration to Iterator

2015-05-19 Thread Paul Sandoz
On May 19, 2015, at 11:17 AM, Peter Levart peter.lev...@gmail.com wrote: Hi, On 05/18/2015 12:20 PM, Paul Sandoz wrote: Hi Stuart, I would like to suggest some tweaks to the specification to get across this method is transitioning control of traversal from enumeration to iterator

<    4   5   6   7   8   9   10   11   12   13   >