Re: RFR: 8202184: Reduce time blocking the ClassSpecializer cache creating SpeciesData

2018-04-24 Thread Peter Levart
Hi Claes, Nice play with CHM and safe publication. If findSpecies() is on a hot concurrent path, you might want to wrap the preface:  176 S speciesData = cache.computeIfAbsent(key, new Function<>() {  177 @Override  178 public S apply(K key1) {  179

Re: 8202062: Put FileChannel and FileOutpuStream variants of AtomicAppend on problem list

2018-04-24 Thread Alan Bateman
On 24/04/2018 23:15, Brian Burkhalter wrote: https://bugs.openjdk.java.net/browse/JDK-8202062 Recently more frequent failures have been observed on macOS. Put on the problem list until the underlying cause can be determined. I think it would be better to change the tests to pass silently when

Re: RFR(M): 8201593: Print array length in ArrayIndexOutOfBoundsException.

2018-04-24 Thread Simon Nash
On 24/04/2018 15:08, Lindenmaier, Goetz wrote: Hi, I implemented what we figured out in http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2018-April/027555.html Some examples: "Index 12 out-of-bounds for length 10." "arraycopy source index -17 out of bounds for object array[10]." "ar

Re: RFR of JDK-8201469,test under java/rmi should be restricted to not run concurrently

2018-04-24 Thread joe darcy
Combining the reformatting and test additions makes the patch more difficult to review. The net effect seems to be adding the following directories to the exclusiveAccess.dirs list:   44 sun/management/jmxremote \   45 sun/rmi \   46 sun/security/mscapi \   47 sun/tools/jstatd

Re: [11] RFR: 8202026 8193552 : ISO 4217 Amendment #165 # 166 Update

2018-04-24 Thread Leo Jiang
Forgot to mention, the tests in Currency fold are passed on Mach5. -Leo On 04/25/2018 09:33 AM, Leo Jiang wrote: Hi, Please review the changes to address the ISO 4217 Amendment 165 166 update. Bug: https://bugs.openjdk.java.net/browse/JDK-8193552  165 https://bugs.openjdk.java.net/browse/JDK-

Re: RFR: 8201274: Launch Single-File Source-Code Programs

2018-04-24 Thread mandy chung
On 4/25/18 8:53 AM, Jonathan Gibbons wrote: On 04/12/2018 10:20 PM, mandy chung wrote: This looks quite good to me.  One small comment on the source launcher Main class: 122 } catch (InvocationTargetException e) { 123 // leave VM to handle the stacktrace, in the

Re: [11] RFR: 8202026 8193552 : ISO 4217 Amendment #165 # 166 Update

2018-04-24 Thread Leo Jiang
+ naoto On 04/25/2018 09:33 AM, Leo Jiang wrote: Hi, Please review the changes to address the ISO 4217 Amendment 165 166 update. Bug: https://bugs.openjdk.java.net/browse/JDK-8193552  165 https://bugs.openjdk.java.net/browse/JDK-8202026  166 CR: http://cr.openjdk.java.net/~ljiang/8202026/webr

Re: [PATCH] regex matcher opt: remove redundant StringBuilder

2018-04-24 Thread Xueming Shen
for String based replaceAll/First() it might be worth doing something like http://cr.openjdk.java.net/~sherman/regex_removesb/webrev/ On 4/24/18, 10:47 AM, Isaac Levy wrote: Hi Sherman, Thanks for clarifying. Looks like exceptions are caused by invalid format string. I wouldn't expect most pro

[11] RFR: 8202026 8193552 : ISO 4217 Amendment #165 # 166 Update

2018-04-24 Thread Leo Jiang
Hi, Please review the changes to address the ISO 4217 Amendment 165 166 update. Bug: https://bugs.openjdk.java.net/browse/JDK-8193552 165 https://bugs.openjdk.java.net/browse/JDK-8202026 166 CR: http://cr.openjdk.java.net/~ljiang/8202026/webrev.00/ Detail: #165 From: MAURITANIA Ouguiya

Re: RFR: 8201274: Launch Single-File Source-Code Programs

2018-04-24 Thread Jonathan Gibbons
On 04/12/2018 10:20 PM, mandy chung wrote: On 4/13/18 4:15 AM, Jonathan Gibbons wrote: Please review an initial implementation for the feature described in JEP 330: Launch Single-File Source-Code Programs. The work is described in the JEP and CSR, and falls into various parts: * The part

Re: JDK 11 RFR of 8200478: For boxing conversion javac uses Long.valueOf which does not guarantee caching according to its javadoc

2018-04-24 Thread Brian Burkhalter
Hi Joe, On Apr 24, 2018, at 5:30 PM, joe darcy wrote: > Please review the patch below to update the specification of > Long.valueOf(long) to require caching on [-128, 127]. The JDK implementation > of this functionality has always cached in that region, even though it is not > required. Look

JDK 11 RFR of 8200478: For boxing conversion javac uses Long.valueOf which does not guarantee caching according to its javadoc

2018-04-24 Thread joe darcy
Hello, Please review the patch below to update the specification of Long.valueOf(long) to require caching on [-128, 127]. The JDK implementation of this functionality has always cached in that region, even though it is not required. Additionally, please review the corresponding CSR:        

Re: [11] RFR: 8181157: CLDR Timezone name fallback implementation

2018-04-24 Thread Stephen Colebourne
I had a quick look through and didn't see anything obvious, but its not an area I know well. Stephen On 17 April 2018 at 22:28, Naoto Sato wrote: > Hello, > > Please review the changes to the following issue: > > https://bugs.openjdk.java.net/browse/JDK-8181157 > > The proposed fix is located at

Re: RFR: JDK-8193877- DateTimeFormatterBuilder throws ClassCastException when using padding

2018-04-24 Thread Stephen Colebourne
To add to Roger's comments, the tests should cover parsing as well as formatting. It is the adjacent parsing behaviour that will be most important to test and get right. For example, Pattern "dM" cannot be parsed (is "1122018" the 1st Dec or the 11th Feb?) But this one should be parsed "ppdpp

Re: 8202062: Put FileChannel and FileOutpuStream variants of AtomicAppend on problem list

2018-04-24 Thread Lance Andersen
+1 > On Apr 24, 2018, at 6:15 PM, Brian Burkhalter > wrote: > > https://bugs.openjdk.java.net/browse/JDK-8202062 > > Recently more frequent failures have been observed on macOS. Put on the > problem list until the underlying cause can be determined. > > Thanks, > > Brian > > --- a/test/jdk/

8202062: Put FileChannel and FileOutpuStream variants of AtomicAppend on problem list

2018-04-24 Thread Brian Burkhalter
https://bugs.openjdk.java.net/browse/JDK-8202062 Recently more frequent failures have been observed on macOS. Put on the problem list until the underlying cause can be determined. Thanks, Brian --- a/test/jdk/ProblemList.txt +++ b/test/jdk/ProblemList.txt @@ -510,8 +510,10 @@ # jdk_io +ja

Re: RFR: 8202184: Reduce time blocking the ClassSpecializer cache creating SpeciesData

2018-04-24 Thread Paul Sandoz
Hi, This looks good. Took me a while to understand the interactions: you need to replace not update otherwise there is a race on isResolved (which currently queries multiple state, there is no singular guard here). We could push isResolved into the synchronized block and simplify but every find

Re: [PATCH] regex matcher opt: remove redundant StringBuilder

2018-04-24 Thread Isaac Levy
Hi Sherman, Thanks for clarifying. Looks like exceptions are caused by invalid format string. I wouldn't expect most programs to be catching this and preserving their buffer, but dunno. How much does it affect perf? Well it depends on use case, a jmh of replaceAll with a length 200 string of digi

Re: [PATCH] Add compareToUnsigned to java.nio.*Buffer

2018-04-24 Thread Paul Sandoz
Thanks. I attached your patch to the issue: https://bugs.openjdk.java.net/browse/JDK-8202216 > On Apr 24, 2018, at 5:51 AM, Robert Stupp wrote: > > Hi Paul, > > Thank you. > > I've filed an RFE via https://bugreport.java.com/bugreport/sta

RFR: 8202184: Reduce time blocking the ClassSpecializer cache creating SpeciesData

2018-04-24 Thread Claes Redestad
Hi, the current implementation of ClassSpecializer.findSpecies may cause excessive blocking due to a potentially expensive computeIfAbsent, and we have reason to believe this might have been cause for a few very rare bootstrap issues in tests that attach debuggers to VM in the middle of this. Br

Re: [PATCH] regex matcher opt: remove redundant StringBuilder

2018-04-24 Thread Xueming Shen
Hi Isaac, I actually meant to say "we are not supposed to output the partial text into the output buffer in case of an exception". It has nothing to do with the changeset you cited. This has been the behavior since day one/JDK1.4, though it is not specified explicitly in the API doc. The newly ad

RE: RFR(M): 8201593: Print array length in ArrayIndexOutOfBoundsException.

2018-04-24 Thread Lindenmaier, Goetz
Hi Simon, Because as stated here, http://mail.openjdk.java.net/pipermail/core-libs-dev/2018-April/052665.html it is used in other places like that, too. Later mails agreed on that usage to keep it consistent. Best regards, Goetz. > -Original Message- > From: Simon Nash [mailto:si...@

[PATCH] regex matcher opt: remove redundant StringBuilder

2018-04-24 Thread Isaac Levy
(moving this to a separate discussion) --- a/src/java.base/share/classes/java/util/regex/Matcher.java +++ b/src/java.base/share/classes/java/util/regex/Matcher.java @@ -993,13 +993,11 @@ public Matcher appendReplacement(StringBuilder sb, String replacement) { // If no match, return e

RE: RFR(M): 8201593: Print array length in ArrayIndexOutOfBoundsException.

2018-04-24 Thread Lindenmaier, Goetz
Hi, I implemented what we figured out in http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2018-April/027555.html Some examples: "Index 12 out-of-bounds for length 10." "arraycopy source index -17 out of bounds for object array[10]." "arraycopy destination index -18 out of bounds for d

Re: [PATCH] minor regex cleanup: use switch for enum

2018-04-24 Thread Remi Forax
And as part of Amber, we are likely change the bytecode translation of the switch on enums (in fact all switches apart the one on integers) to avoid the separate compilation issues you mention (and support more kind of switches). The idea is that the new translation is to use invokedynamic so th

Re: [PATCH] Add compareToUnsigned to java.nio.*Buffer

2018-04-24 Thread Robert Stupp
Hi Paul, Thank you. I've filed an RFE via https://bugreport.java.com/bugreport/start_form.do - seems to be JDK-9053522. It just has no option to add an attachment and I have no login to bugs.openjdk.java.net . On 04/23/2018 11:16 PM, Paul Sandoz wrote: The addition of mismatch is reasonabl

Re: [PATCH] minor regex cleanup: use switch for enum

2018-04-24 Thread Remi Forax
Hi Peter, instead of using @Stable, John Rose had an interesting idea, we talk about a similar issue at last FOSDEM, make all final fields in java.lang trusted by default. The idea is that classes in java.lang doesn't seems to use Unsafe when deserializing (like classes in java.util does), so i

Re: [PATCH] minor regex cleanup: use switch for enum

2018-04-24 Thread David Lloyd
On Mon, Apr 23, 2018 at 7:42 PM, Isaac Levy wrote: > On Mon, Apr 23, 2018 at 5:18 PM David Lloyd wrote: >> >> FWIW I strongly doubt this will improve performance; probably the >> opposite in fact, as IIRC an enum switch generates an extra class >> (though perhaps this has changed). The original

Re: [PATCH] minor regex cleanup: use switch for enum

2018-04-24 Thread Peter Levart
On 04/24/2018 12:41 PM, Peter Levart wrote: public class Code {l     static class m$switch$1 {         static final int[] caseindex = new int[X.values().length];     static {             caseindex[X.A.ordinal()] = 1;             caseindex[X.B.ordinal()] = 2;             caseindex[X.C.ordin

Re: [PATCH] minor regex cleanup: use switch for enum

2018-04-24 Thread Peter Levart
On 04/23/2018 11:18 PM, David Lloyd wrote: FWIW I strongly doubt this will improve performance; probably the opposite in fact, as IIRC an enum switch generates an extra class (though perhaps this has changed). switch on enum is basically a switch on Enum's ordinal mapped via the int[] array