Re: RFR: JDK-8200178 Remove mapfiles for JDK native libraries

2018-04-03 Thread Magnus Ihse Bursie
(pruning cc-list somewhat) On 2018-03-29 08:16, Martin Buchholz wrote: That surprises me. I'm quite certain that javah (or rather, java -h nowadays) generate header files with JNIEXPORT and JNICALL. As you can see in the jni.h and jni_md.h files, JNIEXPORT equals __attribute__((visibi

RFR: 81820709 - Container Awareness JEP

2018-04-03 Thread Bob Vandette
Here is a first pass at an implementation of the Container Awareness JEP. This JEP adds an implementation of an internal API for the extraction of system metrics for processes running in Isolation Groups (Containers). The plan is to get the internal API integrated in JDK 11 with support for Lin

Re: RFR of JDK-8188897: java/rmi/registry/reexport/Reexport.java failed with Port already in use

2018-04-03 Thread Roger Riggs
Hi Hamlin, Instead of a simple time delay, it would be useful to wait for the RegistryVM to terminate. In killRegistry: 149,  adding subreg.waitFor() should be sufficient. 58: If using a 'for' loop it would be easier to understand if it included the usual start, increment and termination. In

Proposal: Export InitializeEncoding for JVM access

2018-04-03 Thread Andrew Leonard
Hi, I would like to propose and find a sponsor for this change please, which is is export from libjava the JNU_InitializeEncoding() method, so that a JVM can initialize the platform encoding. Currently Java_java_lang_System_initProperties initializes the encoding, however for a generic JVM that

Re: RFR: JDK-8200178 Remove mapfiles for JDK native libraries

2018-04-03 Thread Martin Buchholz
On Tue, Apr 3, 2018 at 6:04 AM, Magnus Ihse Bursie < magnus.ihse.bur...@oracle.com> wrote: > (pruning cc-list somewhat) > > On 2018-03-29 08:16, Martin Buchholz wrote: > > That surprises me. I'm quite certain that javah (or rather, java -h > nowadays) generate header files with JNIEXPORT and JNICA

RFR: 8200664: fix broken links in java.base docs

2018-04-03 Thread Jonathan Gibbons
Please review a small update to fix some broken links in the java.base API docs. The change is necessary because when generating HTML 5 output, javadoc no longer has to encode method signatures into the restricted set of characters available in HTML 4 names. JBS: https://bugs.openjdk.java.net

RFR 8200696 : Optimal initial capacity of java.lang.Class.enumConstantDirectory

2018-04-03 Thread Ivan Gerasimov
Hello! Yet another occurrence of not-optimally pre-sized HashMap. When java.lang.Class.enumConstantDirectory is created, the initial capacity is set to be (2 * universe.length), which is more than necessary in some cases. Choosing the capacity optimally will allow us to save a few bytes with

Re: RFR 8200696 : Optimal initial capacity of java.lang.Class.enumConstantDirectory

2018-04-03 Thread David Holmes
Hi Ivan, On 4/04/2018 9:22 AM, Ivan Gerasimov wrote: Hello! Yet another occurrence of not-optimally pre-sized HashMap. When java.lang.Class.enumConstantDirectory is created, the initial capacity is set to be (2 * universe.length), which is more than necessary in some cases. Choosing the ca

Re: RFR 8200696 : Optimal initial capacity of java.lang.Class.enumConstantDirectory

2018-04-03 Thread Ivan Gerasimov
Hi David! On 4/3/18 4:49 PM, David Holmes wrote: Hi Ivan, On 4/04/2018 9:22 AM, Ivan Gerasimov wrote: Hello! Yet another occurrence of not-optimally pre-sized HashMap. When java.lang.Class.enumConstantDirectory is created, the initial capacity is set to be (2 * universe.length), which is m

Re: RFR: 8164781: Pattern.asPredicate specification is incomplete

2018-04-03 Thread Stuart Marks
Hi Vivek, Thanks for taking on this task. In case it wasn't clear from Paul's mail, what I think you should do is continue with this fix as a doc-only (and test-only) change, and not modify the behavior of this method. Doing that would be an incompatible change. Uwe's point is a reasonable o

Re: RFR: 8164781: Pattern.asPredicate specification is incomplete

2018-04-03 Thread Stuart Marks
On 4/3/18 5:43 PM, Stuart Marks wrote: Adding a method to create a Predicate that has match() semantics would be a fine task to consider separately. I notice I had already filed a bug for this: https://bugs.openjdk.java.net/browse/JDK-8184692 Feel free to pick it up. s'marks

Re: RFR 8200696 : Optimal initial capacity of java.lang.Class.enumConstantDirectory

2018-04-03 Thread David Holmes
Hi Ivan, On 4/04/2018 10:01 AM, Ivan Gerasimov wrote: Hi David! On 4/3/18 4:49 PM, David Holmes wrote: Hi Ivan, On 4/04/2018 9:22 AM, Ivan Gerasimov wrote: Hello! Yet another occurrence of not-optimally pre-sized HashMap. When java.lang.Class.enumConstantDirectory is created, the initial

Re: RFR of JDK-8188897: java/rmi/registry/reexport/Reexport.java failed with Port already in use

2018-04-03 Thread Joseph D. Darcy
Hello, Some general comments on the coding for tests like this: * It is preferable to avoid sleep in tests to avoid increasing the minimum amount of time a test takes to run. This helps limit the overall time it takes the test suite to run. * If timeouts are used, it is recommend to factor t

Re: RFR 8200696 : Optimal initial capacity of java.lang.Class.enumConstantDirectory

2018-04-03 Thread David Holmes
On 4/04/2018 1:06 PM, Ivan Gerasimov wrote: Hi David! On 4/3/18 6:41 PM, David Holmes wrote: Hi Ivan, On 4/04/2018 10:01 AM, Ivan Gerasimov wrote: Hi David! On 4/3/18 4:49 PM, David Holmes wrote: Hi Ivan, On 4/04/2018 9:22 AM, Ivan Gerasimov wrote: Hello! Yet another occurrence of not-

Re: RFR 8200696 : Optimal initial capacity of java.lang.Class.enumConstantDirectory

2018-04-03 Thread Ivan Gerasimov
Hi David! On 4/3/18 6:41 PM, David Holmes wrote: Hi Ivan, On 4/04/2018 10:01 AM, Ivan Gerasimov wrote: Hi David! On 4/3/18 4:49 PM, David Holmes wrote: Hi Ivan, On 4/04/2018 9:22 AM, Ivan Gerasimov wrote: Hello! Yet another occurrence of not-optimally pre-sized HashMap. When java.lang.

Re: RFR of JDK-8188897: java/rmi/registry/reexport/Reexport.java failed with Port already in use

2018-04-03 Thread Hamlin Li
Hi Joe, Roger, Thank you for reviewing, I have refactored the test more and fix as you suggested. please review http://cr.openjdk.java.net/~mli/8188897/webrev.01/ Thank you -Hamlin On 04/04/2018 10:42 AM, Joseph D. Darcy wrote: Hello, Some general comments on the coding for tests like th

Re: RFR: 8200664: fix broken links in java.base docs

2018-04-03 Thread Joe Wang
Looks good to me. I verified the links using the Java SE 10 doc. --Joe On 4/3/2018 2:17 PM, Jonathan Gibbons wrote: Please review a small update to fix some broken links in the java.base API docs. The change is necessary because when generating HTML 5 output, javadoc no longer has to encode m

RE: RFR: 8164781: Pattern.asPredicate specification is incomplete

2018-04-03 Thread Vivek Theeyarath
Hi, I have incorporated the changes as per the feedback and here is the updated webrev . http://cr.openjdk.java.net/~rraghavan/8164781/webrev.02/ . Bug: https://bugs.openjdk.java.net/browse/JDK-8164781 Here is the related csr https://bugs.openjdk.java.net/browse/JDK-8200603 I will try

Re: RFR: 8200664: fix broken links in java.base docs

2018-04-03 Thread Alan Bateman
On 03/04/2018 22:17, Jonathan Gibbons wrote: Please review a small update to fix some broken links in the java.base API docs. The change is necessary because when generating HTML 5 output, javadoc no longer has to encode method signatures into the restricted set of characters available in HTM

Re: RFR 8200696 : Optimal initial capacity of java.lang.Class.enumConstantDirectory

2018-04-03 Thread Claes Redestad
Hi Ivan, looks good. Nit: maybe (int)(universe.length / 0.75f) + 1 to keep fp arithmetic to a minimum. /Claes On 2018-04-04 01:22, Ivan Gerasimov wrote: Hello! Yet another occurrence of not-optimally pre-sized HashMap. When java.lang.Class.enumConstantDirectory is created, the initial ca