Re: RFR: 8273314: Add tier4 test groups

2021-09-03 Thread Igor Ignatyev
On Fri, 3 Sep 2021 18:40:14 GMT, Aleksey Shipilev wrote: > > > <...> I have excluded `vmTestbase` and `hotspot:tier4`<...> I have also > > > excluded `applications` from `hotspot:tier4` <...> > > > > > > assuming the goal of tier4 is to catch the rest of the tests, I don't think > > we

Re: RFR: 8273314: Add tier4 test groups

2021-09-03 Thread Sergey Bylokhov
On Fri, 3 Sep 2021 09:10:20 GMT, Aleksey Shipilev wrote: > During the review of JDK-8272914 that added hotspot:tier{2,3} groups, > @iignatev suggested to create tier4 groups that capture all tests not in > tiers{1,2,3}. I have excluded `vmTestbase` and `hotspot:tier4,` because they > take 10+

Re: RFR: 6957241: ClassLoader.getResources() returns only 1 instance when using jar indexing

2021-09-03 Thread wxiang
On Fri, 3 Sep 2021 10:48:01 GMT, Alan Bateman wrote: > > @AlanBateman Sure, I am interested in it. > > Great! I think there are several parts to this. The removal of the JAR index > support from the URLClassLoader implementation, the `jar i` option, the JAR > file spec, and the jar tool man

Re: RFR: 8273329: Remove redundant null check from String.getBytes(String charsetName)

2021-09-03 Thread Naoto Sato
On Fri, 3 Sep 2021 13:22:54 GMT, Сергей Цыпанов wrote: > Current implementation looks like this: > > public byte[] getBytes(String charsetName) > throws UnsupportedEncodingException { > if (charsetName == null) throw new NullPointerException(); > return

Re: RFR: 8255878: FilterInputStream is missing implementations of Java 9 InputStream methods [v2]

2021-09-03 Thread Daniel Fuchs
On Fri, 3 Sep 2021 23:19:22 GMT, Brian Burkhalter wrote: >> This request proposes to modify `java.io.FilterInputStream` to override >> `readAllBytes()`, `readNBytes(int)`, `skipNBytes(long)`, and >> `transferTo(OutputStream)` in order to leverage any performance advantage >> that the wrapped

Re: Possible ClassCastException in java.util.regex.Pattern.BmpCharPredicate#union(java.util.regex.Pattern.CharPredicate...)

2021-09-03 Thread Stuart Marks
Yeah, not only does this static union() method seem like dead code, it seems wrong as well. Perhaps igraves should take a look at this. The whole area seems suspicious. There doesn't seem to be any semantic difference between BmpCharPredicate and CharPredicate. The and() & union() combinators

Re: RFR: 8255878: FilterInputStream is missing implementations of Java 9 InputStream methods [v2]

2021-09-03 Thread Brian Burkhalter
> This request proposes to modify `java.io.FilterInputStream` to override > `readAllBytes()`, `readNBytes(int)`, `skipNBytes(long)`, and > `transferTo(OutputStream)` in order to leverage any performance advantage > that the wrapped stream might have over the `java.io.InputStream` >

Re: RFR: 8255878: FilterInputStream is missing implementations of Java 9 InputStream methods

2021-09-03 Thread Brian Burkhalter
On Fri, 3 Sep 2021 22:29:19 GMT, Brian Burkhalter wrote: > This request proposes to modify `java.io.FilterInputStream` to override > `readAllBytes()`, `readNBytes(int)`, `skipNBytes(long)`, and > `transferTo(OutputStream)` in order to leverage any performance advantage > that the wrapped

RFR: 8255878: FilterInputStream is missing implementations of Java 9 InputStream methods

2021-09-03 Thread Brian Burkhalter
This request proposes to modify `java.io.FilterInputStream` to override `readAllBytes()`, `readNBytes(int)`, `skipNBytes(long)`, and `transferTo(OutputStream)` in order to leverage any performance advantage that the wrapped stream might have over the `java.io.InputStream` implementations of

Re: RFR: 8273101: Eliminate the usage of threadgroup sandboxing in the java.util.logging

2021-09-03 Thread Sergey Bylokhov
On Thu, 2 Sep 2021 09:59:51 GMT, Daniel Fuchs wrote: >> The "java.util.logging.LogManager" class uses the "threadgroup sandboxing" >> via an AppContext to support "applet logging isolation". The AppContext >> class became useless since the plugin and webstart are no longer supported >> and

RFR: JDK-8273246 Amend the test java/nio/channels/DatagramChannel/ManySourcesAndTargets.java to execute in othervm mode

2021-09-03 Thread Mark Sheppard
A number of nio DatagramChannel tests are intermittently failing on macosx-aarch64. In some instances this is a receive call blocking indefinitely waiting on data which has already been sent, and should be available immediately to the receive method call. Other test failure scenarios are

Re: RFR: 8273101: Eliminate the usage of threadgroup sandboxing in the java.util.logging

2021-09-03 Thread Daniel Fuchs
On Wed, 1 Sep 2021 06:31:16 GMT, Sergey Bylokhov wrote: > The "java.util.logging.LogManager" class uses the "threadgroup sandboxing" > via an AppContext to support "applet logging isolation". The AppContext class > became useless since the plugin and webstart are no longer supported and >

Re: RFR: 8273329: Remove redundant null check from String.getBytes(String charsetName)

2021-09-03 Thread Сергей Цыпанов
On Fri, 3 Sep 2021 14:04:27 GMT, Roger Riggs wrote: > Redundant null checks get collapsed by HotSpot, so not a performance > improvement. Hi Roger, indeed, no improvement observed. How did you know it beforehand? I was pretty sure we are going to win a couple of ns on this wide-used method.

Re: RFR: 8273329: Remove redundant null check from String.getBytes(String charsetName)

2021-09-03 Thread Sergey Bylokhov
On Fri, 3 Sep 2021 17:37:08 GMT, Sergey Bylokhov wrote: >> Current implementation looks like this: >> >> public byte[] getBytes(String charsetName) >> throws UnsupportedEncodingException { >> if (charsetName == null) throw new NullPointerException(); >> return

Re: RFR: 8273329: Remove redundant null check from String.getBytes(String charsetName)

2021-09-03 Thread Сергей Цыпанов
On Fri, 3 Sep 2021 17:37:08 GMT, Sergey Bylokhov wrote: >> Current implementation looks like this: >> >> public byte[] getBytes(String charsetName) >> throws UnsupportedEncodingException { >> if (charsetName == null) throw new NullPointerException(); >> return

Re: RFR: 8078641: MethodHandle.asTypeCache can retain classes from unloading [v4]

2021-09-03 Thread Vladimir Ivanov
On Fri, 3 Sep 2021 14:41:45 GMT, Vladimir Ivanov wrote: >> `MethodHandle.asTypeCache` keeps a strong reference to adapted >> `MethodHandle` and it can introduce a class loader leak through its >> `MethodType`. >> >> Proposed fix introduces a 2-level cache (1 element each) where 1st level can

Re: RFR: 8273329: Remove redundant null check from String.getBytes(String charsetName)

2021-09-03 Thread Iris Clark
On Fri, 3 Sep 2021 13:22:54 GMT, Сергей Цыпанов wrote: > Current implementation looks like this: > > public byte[] getBytes(String charsetName) > throws UnsupportedEncodingException { > if (charsetName == null) throw new NullPointerException(); > return

Re: RFR: 8273314: Add tier4 test groups

2021-09-03 Thread Aleksey Shipilev
On Fri, 3 Sep 2021 18:32:21 GMT, Igor Ignatyev wrote: > > <...> I have excluded `vmTestbase` and `hotspot:tier4`<...> I have also > > excluded `applications` from `hotspot:tier4` <...> > > assuming the goal of tier4 is to catch the rest of the tests, I don't think > we should exclude

Re: RFR: 6957241: ClassLoader.getResources() returns only 1 instance when using jar indexing

2021-09-03 Thread Stuart Marks
On Fri, 3 Sep 2021 10:48:01 GMT, Alan Bateman wrote: > There will probably need to be some discussion on what to do with the jar > tool. I suspect we will need to keep the code that updates the index when > updating a JAR file that has an existing index, this means keeping > JarIndex

Re: RFR: 8273314: Add tier4 test groups

2021-09-03 Thread Igor Ignatyev
On Fri, 3 Sep 2021 09:10:20 GMT, Aleksey Shipilev wrote: > During the review of JDK-8272914 that added hotspot:tier{2,3} groups, > @iignatev suggested to create tier4 groups that capture all tests not in > tiers{1,2,3}. I have excluded `vmTestbase` and `hotspot:tier4,` because they > take 10+

Re: RFR: 8078641: MethodHandle.asTypeCache can retain classes from unloading [v4]

2021-09-03 Thread Stuart Marks
On Fri, 3 Sep 2021 14:41:45 GMT, Vladimir Ivanov wrote: >> `MethodHandle.asTypeCache` keeps a strong reference to adapted >> `MethodHandle` and it can introduce a class loader leak through its >> `MethodType`. >> >> Proposed fix introduces a 2-level cache (1 element each) where 1st level can

Re: RFR: 8273101: Eliminate the usage of threadgroup sandboxing in the java.util.logging

2021-09-03 Thread Sergey Bylokhov
On Fri, 3 Sep 2021 17:19:05 GMT, Phil Race wrote: > Perhaps this isn't the change that requires the CSR but it then leaves an > inconsistent state where desktop supports AppContext still but other modules > don't ... Even java.desktop does not support it fully, since for a couple of years

Re: RFR: 8273329: Remove redundant null check from String.getBytes(String charsetName)

2021-09-03 Thread Sergey Bylokhov
On Fri, 3 Sep 2021 13:22:54 GMT, Сергей Цыпанов wrote: > Current implementation looks like this: > > public byte[] getBytes(String charsetName) > throws UnsupportedEncodingException { > if (charsetName == null) throw new NullPointerException(); > return

Re: RFR: 8273101: Eliminate the usage of threadgroup sandboxing in the java.util.logging

2021-09-03 Thread Phil Race
On Wed, 1 Sep 2021 06:31:16 GMT, Sergey Bylokhov wrote: > The "java.util.logging.LogManager" class uses the "threadgroup sandboxing" > via an AppContext to support "applet logging isolation". The AppContext class > became useless since the plugin and webstart are no longer supported and >

Re: RFR: 8273101: Eliminate the usage of threadgroup sandboxing in the java.util.logging

2021-09-03 Thread Phil Race
On Wed, 1 Sep 2021 06:31:16 GMT, Sergey Bylokhov wrote: > The "java.util.logging.LogManager" class uses the "threadgroup sandboxing" > via an AppContext to support "applet logging isolation". The AppContext class > became useless since the plugin and webstart are no longer supported and >

Re: RFR: 8273101: Eliminate the usage of threadgroup sandboxing in the java.util.logging

2021-09-03 Thread Phil Race
On Wed, 1 Sep 2021 06:31:16 GMT, Sergey Bylokhov wrote: > The "java.util.logging.LogManager" class uses the "threadgroup sandboxing" > via an AppContext to support "applet logging isolation". The AppContext class > became useless since the plugin and webstart are no longer supported and >

Re: RFR: 8273101: Eliminate the usage of threadgroup sandboxing in the java.util.logging

2021-09-03 Thread Phil Race
On Wed, 1 Sep 2021 06:31:16 GMT, Sergey Bylokhov wrote: > The "java.util.logging.LogManager" class uses the "threadgroup sandboxing" > via an AppContext to support "applet logging isolation". The AppContext class > became useless since the plugin and webstart are no longer supported and >

Re: RFR: 8078641: MethodHandle.asTypeCache can retain classes from unloading [v4]

2021-09-03 Thread Peter Levart
On Fri, 3 Sep 2021 14:41:45 GMT, Vladimir Ivanov wrote: >> `MethodHandle.asTypeCache` keeps a strong reference to adapted >> `MethodHandle` and it can introduce a class loader leak through its >> `MethodType`. >> >> Proposed fix introduces a 2-level cache (1 element each) where 1st level can

Re: RFR: 8078641: MethodHandle.asTypeCache can retain classes from unloading [v3]

2021-09-03 Thread Vladimir Ivanov
On Fri, 3 Sep 2021 12:51:13 GMT, Peter Levart wrote: >> Vladimir Ivanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Address review comments > > src/java.base/share/classes/java/lang/invoke/MethodHandle.java line 877: > >> 875:

Re: RFR: 8078641: MethodHandle.asTypeCache can retain classes from unloading [v4]

2021-09-03 Thread Vladimir Ivanov
> `MethodHandle.asTypeCache` keeps a strong reference to adapted `MethodHandle` > and it can introduce a class loader leak through its `MethodType`. > > Proposed fix introduces a 2-level cache (1 element each) where 1st level can > only contain `MethodHandle`s which are guaranteed to not

Re: RFR: 8272600: (test) Use native "sleep" in Basic.java [v4]

2021-09-03 Thread Roger Riggs
> The intermittent test in java/lang/ProcessBuilder/Basic.java has identified > unexpected messages from a child Java VM > as the cause of the test failure. Attempts to control the output of the > child VM have failed, the VM is unrepentant . > > There is no functionality in the child except

Re: RFR: 8078641: MethodHandle.asTypeCache can retain classes from unloading [v3]

2021-09-03 Thread Peter Levart
On Thu, 2 Sep 2021 11:35:52 GMT, Vladimir Ivanov wrote: >> `MethodHandle.asTypeCache` keeps a strong reference to adapted >> `MethodHandle` and it can introduce a class loader leak through its >> `MethodType`. >> >> Proposed fix introduces a 2-level cache (1 element each) where 1st level can

Re: RFR: 8273329: Remove redundant null check from String.getBytes(String charsetName)

2021-09-03 Thread Roger Riggs
On Fri, 3 Sep 2021 13:22:54 GMT, Сергей Цыпанов wrote: > Current implementation looks like this: > > public byte[] getBytes(String charsetName) > throws UnsupportedEncodingException { > if (charsetName == null) throw new NullPointerException(); > return

Re: RFR: 8273261: Replace 'while' cycles with iterator with enhanced-for in java.base

2021-09-03 Thread Sean Mullan
On Wed, 1 Sep 2021 07:37:53 GMT, Andrey Turbanov wrote: > There are few places in code where manual while loop is used with Iterator to > iterate over Collection. > Instead of manual while cycles it's preferred to use enhanced-for cycle > instead: it's less verbose, makes code easier to read

RFR: 8273329: Remove redundant null check from String.getBytes(String charsetName)

2021-09-03 Thread Сергей Цыпанов
Current implementation looks like this: public byte[] getBytes(String charsetName) throws UnsupportedEncodingException { if (charsetName == null) throw new NullPointerException(); return encode(lookupCharset(charsetName), coder(), value); } Null check seems to be redundant here

Re: RFR: 8272600: (test) Use native "sleep" in Basic.java [v3]

2021-09-03 Thread Roger Riggs
On Sat, 28 Aug 2021 02:34:48 GMT, Roger Riggs wrote: >> The intermittent test in java/lang/ProcessBuilder/Basic.java has identified >> unexpected messages from a child Java VM >> as the cause of the test failure. Attempts to control the output of the >> child VM have failed, the VM is

Re: RFR: 8078641: MethodHandle.asTypeCache can retain classes from unloading [v3]

2021-09-03 Thread Vladimir Ivanov
On Fri, 3 Sep 2021 00:09:17 GMT, Mandy Chung wrote: > For the change of MethodHandle::asType to a final method, this needs a CSR. It is not allowed to extend/subclass `MethodHandle` outside `java.lang.invoke` package. So, the aforementioned change doesn't have any compatibility risks. Do I

Re: RFR: 6957241: ClassLoader.getResources() returns only 1 instance when using jar indexing

2021-09-03 Thread Alan Bateman
On Thu, 2 Sep 2021 11:43:46 GMT, Alan Bateman wrote: >> Using jarIndex for Hibench, there is an unexpected behavior with the >> exception "Exception in thread "main" >> org.apache.hadoop.fs.UnsupportedFileSystemException: No FileSystem for >> scheme "hdfs"". >> >> After investigating it, it

RFR: 8273315: Parallelize and increase timeouts for java/foreign/TestMatrix.java test

2021-09-03 Thread Aleksey Shipilev
This test runs a lot of configurations, and spends a lot of time serially. This is especially pronounced when run in prospective tier4 runs (JDK-8273314). There are reports of multi-hour runs (see JDK-8271613). We can parallelize the test configurations for this test to make it hurt less. Also,

Re: RFR: 8268231: Aarch64: Use ldp in intrinsics for String.compareTo [v4]

2021-09-03 Thread Wu Yan
On Wed, 28 Jul 2021 08:51:38 GMT, Andrew Haley wrote: >> I don't think we want to keep two copies of the compareTo intrinsic. If >> there are no cases where the LDP version is worse than the original version >> then we should just delete the old one and replace it with this. > >> I don't think

RFR: 8273314: Add tier4 test groups

2021-09-03 Thread Aleksey Shipilev
During the review of JDK-8272914 that added hotspot:tier{2,3} groups, @iignatev suggested to create tier4 groups that capture all tests not in tiers{1,2,3}. I have excluded `vmTestbase` and `hotspot:tier4,` because they take 10+ hours on my highly parallel machine. I have also excluded

Re: RFR: 6957241: ClassLoader.getResources() returns only 1 instance when using jar indexing

2021-09-03 Thread wxiang
On Thu, 2 Sep 2021 11:43:46 GMT, Alan Bateman wrote: >> Using jarIndex for Hibench, there is an unexpected behavior with the >> exception "Exception in thread "main" >> org.apache.hadoop.fs.UnsupportedFileSystemException: No FileSystem for >> scheme "hdfs"". >> >> After investigating it, it