RFR 8229958: Provider.getService() scalability issue for legacy algorithms and message digests

2019-08-20 Thread Yang, Letu
Hi, Please review the fix of https://bugs.openjdk.java.net/browse/JDK-8229958 where I made the change to allow majority of calls don't have to acquire the locks when checking the availability of the Provider object. Similar effort had been made in fixing

Re: RFR 8207814: (proxy) upgrade the proxy class generator

2019-08-20 Thread Mandy Chung
Hi Roger, The new test case looks good.  Thanks for adding that. I like the renamed ProxyGenerator_v49 better.  ProxyPerf.java needs to be updated to call the renamed class. Other than that, the patch looks good.  I'll rely on the test runs to verify this patch.  No need for a new webrev.

Re: 8229845: Decrease memory consumption of BigInteger.toString()

2019-08-20 Thread Brian Burkhalter
Hi Ivan, > On Aug 20, 2019, at 2:45 PM, Ivan Gerasimov wrote: > > Would it make sense to add an argument `digits` to smallToString (like the > same named argument of toString, the minimum number of digits to pad to), so > it could zero-pad the result itself? > > This way we could avoid

Re: 8229845: Decrease memory consumption of BigInteger.toString()

2019-08-20 Thread Brian Burkhalter
> On Aug 20, 2019, at 2:58 PM, Claes Redestad wrote: > > On 2019-08-20 23:56, Claes Redestad wrote: >> On 2019-08-20 10:05, Aleksey Shipilev wrote: >>> >>> *) This might be "static final", while we are at it: >>> >>> 4109 private static String[] zeros = new String[64]; >> Addressed by

Re: RFR: JDK-8139820: URLClassPath.FileLoader constructor redundantly checks protocol

2019-08-20 Thread Claes Redestad
On 2019-08-20 02:52, Evgeny Mandrikov wrote: Thank you for review and sponsoring! Updated patch - http://cr.openjdk.java.net/~godin/8139820/webrev.01/ Ran it through the first couple of test tiers and pushed. /Claes

Re: 8229845: Decrease memory consumption of BigInteger.toString()

2019-08-20 Thread Claes Redestad
On 2019-08-20 23:56, Claes Redestad wrote: On 2019-08-20 10:05, Aleksey Shipilev wrote:   *) This might be "static final", while we are at it: 4109 private static String[] zeros = new String[64]; Addressed by http://cr.openjdk.java.net/~redestad/8228581/open.00/ Meant to link the

Re: 8229845: Decrease memory consumption of BigInteger.toString()

2019-08-20 Thread Claes Redestad
On 2019-08-20 10:05, Aleksey Shipilev wrote: *) This might be "static final", while we are at it: 4109 private static String[] zeros = new String[64]; Addressed by http://cr.openjdk.java.net/~redestad/8228581/open.00/ /Claes

Re: 8229845: Decrease memory consumption of BigInteger.toString()

2019-08-20 Thread Ivan Gerasimov
Hi Brian! Would it make sense to add an argument `digits` to smallToString (like the same named argument of toString, the minimum number of digits to pad to), so it could zero-pad the result itself? This way we could avoid inserting zeros into the middle of a StringBuilder after a call to

RE: RFR: 8224974: Implement JEP 352

2019-08-20 Thread Viswanathan, Sandhya
Hi Andrew/Alan, It is wonderful to see this feature integrated. Thanks a lot for all your hard work. Best Regards, Sandhya -Original Message- From: core-libs-dev [mailto:core-libs-dev-boun...@openjdk.java.net] On Behalf Of Andrew Dinn Sent: Tuesday, August 20, 2019 2:36 AM To: Alan

Re: RFR 8207814: (proxy) upgrade the proxy class generator

2019-08-20 Thread Roger Riggs
Hi, Updated the webrev to rename the old ProxyGenerator to reflect the bytecode version (v49) and added a combo test for throwing exceptions in the handler (expected and unexpected). http://cr.openjdk.java.net/~rriggs/webrev-upgrade-proxy-gen-8207814/ Thanks, Roger On 8/19/19 6:13 PM,

Re: 8229845: Decrease memory consumption of BigInteger.toString()

2019-08-20 Thread Brian Burkhalter
Delta [1] and revised [2] patches: [1] http://cr.openjdk.java.net/~bpb/8229845/webrev.00-01/ [2] http://cr.openjdk.java.net/~bpb/8229845/webrev.01/ > On Aug 20, 2019, at 1:05 AM, Aleksey Shipilev wrote: > > On 8/19/19 10:08 PM, Brian

Re: RFR 8211360 : Change #if DEF to #if defined(DEF)

2019-08-20 Thread Brian Burkhalter
Hello Ivan, Looks fine. Brian > On Aug 20, 2019, at 10:38 AM, Ivan Gerasimov > wrote: > > It's a followup for JDK-8211146. > > With that fix several C-preprocessor statements of form #elif __linux__ were > changed to more accurate #elif defined(__linux__). > > grep found a few more

RFR 8211360 : Change #if DEF to #if defined(DEF)

2019-08-20 Thread Ivan Gerasimov
Hello! It's a followup for JDK-8211146. With that fix several C-preprocessor statements of form #elif __linux__ were changed to more accurate #elif defined(__linux__). grep found a few more occurrences of the same pattern, which also would better be cleaned up. BUGURL:

Re: 8229845: Decrease memory consumption of BigInteger.toString()

2019-08-20 Thread Ivan Gerasimov
While we're here. On 8/20/19 1:05 AM, Aleksey Shipilev wrote: *) This might be "static final", while we are at it: 4109 private static String[] zeros = new String[64]; It may make sense to create the only string as private static final String zeros = "0".repeat(63); and then replace

Re: RFR: JDK-8229871: Imporve performance of Method.copy() and leafCopy()

2019-08-20 Thread Mandy Chung
Hi Ogata, The patch looks okay.  Nit: please add a space between if and (. About volatile methodAccessor field, I checked the history.  Both fieldAccessor and methodAccessor were started as volatile and the fieldAccessor declaration was updated due to JDK-5044412.   As you observe, I think

Re: flatMap still prevents short circuiting when using .iterator()

2019-08-20 Thread Stephen Buergler
Oops thanks. So I think the issue is that StreamSpliterators.java has this line bufferSink = ph.wrapSink(b::accept); that creates a Sink that never returns true in cancellationRequested() which is needed to get flatMap() to stop looping. On Thu, Aug 15, 2019 at 7:43 PM David Holmes wrote: > >

Re: RFR: 8229899: java.io.File.isInvalid() is racy

2019-08-20 Thread Arthur Eubanks
Thanks for the reviews! On Tue, Aug 20, 2019 at 8:21 AM Martin Buchholz wrote: > Looks good to me. > > On Mon, Aug 19, 2019 at 4:15 PM Arthur Eubanks > wrote: > >> Bug: https://bugs.openjdk.java.net/browse/JDK-8229899 >> Webrev: http://cr.openjdk.java.net/~aeubanks/8229899/webrev.00/ >> >>

Re: RFR: 8229899: java.io.File.isInvalid() is racy

2019-08-20 Thread Martin Buchholz
Looks good to me. On Mon, Aug 19, 2019 at 4:15 PM Arthur Eubanks wrote: > Bug: https://bugs.openjdk.java.net/browse/JDK-8229899 > Webrev: http://cr.openjdk.java.net/~aeubanks/8229899/webrev.00/ > > final boolean isInvalid() { > if (status == null) { > status =

Re: RFR: 8224974: Implement JEP 352

2019-08-20 Thread Dmitry Chuyko
On 8/20/19 11:02 AM, Andrew Dinn wrote: On 19/08/2019 19:38, Dmitry Chuyko wrote: Just a minor style thing in MapSyncFail test: can "true" and "false" (the mode) be "READ_WRITE_SYNC" and "READ_ONLY_SYNC" instead? Are you referring to the arguments passed on the command line? If so then the

Re: RFR: 8229899: java.io.File.isInvalid() is racy

2019-08-20 Thread Alan Bateman
On 20/08/2019 00:14, Arthur Eubanks wrote: Bug: https://bugs.openjdk.java.net/browse/JDK-8229899 Webrev: http://cr.openjdk.java.net/~aeubanks/8229899/webrev.00/ final boolean isInvalid() { if (status == null) { status = (this.path.indexOf('\u') < 0) ?

Re: RFR: 8224974: Implement JEP 352

2019-08-20 Thread Andrew Dinn
On 19/08/2019 15:36, Alan Bateman wrote: > I think webrev.12 looks good; I don't have any other comments. Thanks, Alan. I just pushed the patch for the JEP implementation. (Hallelujah!). Thanks for all your help. regards, Andrew Dinn --- Senior Principal Software Engineer Red Hat UK Ltd

Re: 8229845: Decrease memory consumption of BigInteger.toString()

2019-08-20 Thread Aleksey Shipilev
On 8/19/19 10:08 PM, Brian Burkhalter wrote: > [2] http://cr.openjdk.java.net/~bpb/8229845/webrev.00/ Two drive-by comments: *) It seems the "signum == 0" case in smallToString is regressing? Before, it just returned the constant-pooled "0", now it goes via StringBuilder; *) This might be

Re: RFR: 8224974: Implement JEP 352

2019-08-20 Thread Andrew Dinn
On 19/08/2019 19:38, Dmitry Chuyko wrote: > Just a minor style thing in MapSyncFail test: can "true" and "false" > (the mode) be "READ_WRITE_SYNC" and "READ_ONLY_SYNC" instead? Are you referring to the arguments passed on the command line? If so then the answer is clearly yes. However, I'm not

Re: RFR: 8229899: java.io.File.isInvalid() is racy

2019-08-20 Thread Aleksey Shipilev
On 8/20/19 1:14 AM, Arthur Eubanks wrote: > Bug: https://bugs.openjdk.java.net/browse/JDK-8229899 > Webrev: http://cr.openjdk.java.net/~aeubanks/8229899/webrev.00/ Right, the new code turns data race benign. In older code, the first read of "status" could have returned "!null", while the second