Re: RFR: 8283276: java/io/ObjectStreamClass/ObjectStreamClassCaching.java fails with various GCs [v2]

2022-08-02 Thread Peter Levart
On Tue, 2 Aug 2022 18:03:14 GMT, Roman Kennke wrote: > Does't it make sense to also test SerialGC? Other than that it looks good. Added SerialGC variant and it passes the test. - PR: https://git.openjdk.org/jdk/pull/9684

Re: RFR: 8283276: java/io/ObjectStreamClass/ObjectStreamClassCaching.java fails with various GCs [v2]

2022-08-02 Thread Peter Levart
> This is a continuation of effort from > https://github.com/openjdk/jdk/pull/9533 to fix the ObjectStreamClassCaching > test which is failing with various GCs != G1. The test class contains 2 test > methods: > - test2CacheReleaseUnderMemoryPressure - this one was not logically changed > at all

RFR: Merge jdk19

2022-08-02 Thread David Holmes
Forward port JDK 19 -> JDK 20 - Commit messages: - Merge remote-tracking branch 'jdk19/master' into Merge_jdk19 - 8291524: jdk/jfr/event/runtime/TestClassLoaderStatsEvent.java Value not equal to 2, field='hiddenClassCount', value='0' - 8291512: Snippetize modules API examples The

Withdrawn: Merge jdk19

2022-08-02 Thread David Holmes
On Wed, 3 Aug 2022 00:12:38 GMT, David Holmes wrote: > Forward port JDK 19 -> JDK 20 This pull request has been closed without being integrated. - PR: https://git.openjdk.org/jdk/pull/9720

Re: Withdrawn: Merge jdk19

2022-08-02 Thread David Holmes
No idea what happened here but am redoing as: https://github.com/openjdk/jdk/pull/9721 David On 3/08/2022 10:14 am, David Holmes wrote: On Sat, 30 Jul 2022 07:22:38 GMT, David Holmes wrote: Forward port JDK 19 -> JDK 20 This pull request has been closed without being integrated.

Re: RFR: 8283660: Convert com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java finalizer to Cleaner [v16]

2022-08-02 Thread Hans Boehm
On Tue, Aug 2, 2022 at 7:43 PM Stuart Marks wrote: > ... > Setting this aside, it does seem like all uses of a cleanable object need > to have a try/finally statement, with at least an RF in the finally clause. > Is there any evidence that shows that this construct isn't needed? > I think the rea

Re: RFR: 8283660: Convert com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java finalizer to Cleaner [v16]

2022-08-02 Thread Stuart Marks
On Fri, 22 Jul 2022 20:51:59 GMT, Brent Christian wrote: >> Please review this change to replace the finalizer in >> `AbstractLdapNamingEnumeration` with a Cleaner. >> >> The pieces of state required for cleanup (`LdapCtx homeCtx`, `LdapResult >> res`, and `LdapClient enumClnt`) are moved to a

Re: RFR: 8291508: Fix some tests with "requires vm.jvmti & vm.continuations" [v4]

2022-08-02 Thread Ao Qi
On Tue, 2 Aug 2022 17:25:19 GMT, Alan Bateman wrote: > Just an FYI that the [ORDER OF > TAGS](https://openjdk.org/jtreg/tag-spec.html#ORDER) section of the tag > language spec recommends putting the `@requires` before the `@modules` and > `@library` tags. Done. Didn't know that. Thank you for

Re: RFR: 8291508: Fix some tests with "requires vm.jvmti & vm.continuations" [v5]

2022-08-02 Thread Ao Qi
> `vmTestbase/nsk/jvmti/GetThreadInfo/thrinfo001/TestDescription.java` and > `vmTestbase/nsk/jvmti/RedefineClasses/StressRedefineVirtual/StressRedefineVirtual.java` > are added or modified by > [JDK-8284161](https://bugs.openjdk.org/browse/JDK-8284161), and they are > failed if Loom or JVMTI is

Re: RFR: 8291118: [vectorapi] Optimize the implementation of lanewise FIRST_NONZERO

2022-08-02 Thread Xiaohong Gong
On Fri, 29 Jul 2022 03:55:54 GMT, Xiaohong Gong wrote: > Vector API binary op "`FIRST_NONZERO`" represents the vector operation of "`a > != 0 ? a : b`", which can be implemented with existing APIs like "`compare + > blend`". The current implementation is more complex especially for the > float

Re: RFR: 8290036: adjustments to specification of Runtime::addShutdownHook

2022-08-02 Thread David Holmes
On Fri, 8 Jul 2022 23:00:15 GMT, Stuart Marks wrote: > Initial edits to addShutdownHook from Alex. > > See [JDK-8290036](https://bugs.openjdk.org/browse/JDK-8290036). Hi Stuart, There's nothing I would consider harmful in these changes, but I also don't see them as necessary. Cheers. src/ja

Re: RFR: 8290036: adjustments to specification of Runtime::addShutdownHook

2022-08-02 Thread Stuart Marks
On Fri, 8 Jul 2022 23:00:15 GMT, Stuart Marks wrote: > Initial edits to addShutdownHook from Alex. > > See [JDK-8290036](https://bugs.openjdk.org/browse/JDK-8290036). Sorry David I should have clarified this a bit. The changes currently in this draft PR are merely what occurred to Alex and me

RFR: 8290036: adjustments to specification of Runtime::addShutdownHook

2022-08-02 Thread Stuart Marks
Initial edits to addShutdownHook from Alex. See [JDK-8290036](https://bugs.openjdk.org/browse/JDK-8290036). - Commit messages: - Additional wording changes to Runtime specs. - HTML fixups; updates in response to review comments. - Updates to Runtime class spec, exit, halt, and Sys

RFR: Merge jdk19

2022-08-02 Thread David Holmes
Forward port JDK 19 -> JDK 20 - Commit messages: - Merge remote-tracking branch 'jdk19/master' into Merge_jdk19 - 8291524: jdk/jfr/event/runtime/TestClassLoaderStatsEvent.java Value not equal to 2, field='hiddenClassCount', value='0' - 8291512: Snippetize modules API examples The

Withdrawn: Merge jdk19

2022-08-02 Thread David Holmes
On Sat, 30 Jul 2022 07:22:38 GMT, David Holmes wrote: > Forward port JDK 19 -> JDK 20 This pull request has been closed without being integrated. - PR: https://git.openjdk.org/jdk/pull/9692

Re: RFR: 8290047: (fs) FileSystem.getPathMatcher does not check for ":" at last index [v6]

2022-08-02 Thread Brian Burkhalter
> For a `String` “s”, `s.indexOf(int)` can never return a value `>= s.length()` > so change the check > > int pos = syntaxAndInput.indexOf(':'); > if (pos <= 0 || pos == syntaxAndInput.length()) > > to > > if (pos <= 0) Brian Burkhalter has updated the pull request incr

Re: RFR: JDK-8289106: Add model of class file versions to core reflection [v5]

2022-08-02 Thread Roger Riggs
On Mon, 1 Aug 2022 23:05:58 GMT, Joe Darcy wrote: >> Probably by creating and using shared instances of `java.util.Function` >> which would also allow deduplicating the code. > >> Is there another way to implement this that does not create 19 anonymous >> classes with a single overloaded method

Re: RFR: 8288327: Executable.hasRealParameterData should not be volatile [v7]

2022-08-02 Thread Сергей Цыпанов
On Tue, 2 Aug 2022 17:48:07 GMT, Peter Levart wrote: >> Let's wait a bit > > @stsypanov Do you need a sponsor or are you waiting for some other reviewer? @plevart I don't think we need any more review for the change is simple - PR: https://git.openjdk.org/jdk/pull/9143

Re: RFR: 8291508: Fix some tests with "requires vm.jvmti & vm.continuations" [v4]

2022-08-02 Thread Leonid Mesnik
On Tue, 2 Aug 2022 06:32:09 GMT, Ao Qi wrote: >> `vmTestbase/nsk/jvmti/GetThreadInfo/thrinfo001/TestDescription.java` and >> `vmTestbase/nsk/jvmti/RedefineClasses/StressRedefineVirtual/StressRedefineVirtual.java` >> are added or modified by >> [JDK-8284161](https://bugs.openjdk.org/browse/JDK-

Re: RFR: 8290047: (fs) FileSystem.getPathMatcher does not check for ":" at last index [v5]

2022-08-02 Thread Lance Andersen
On Tue, 2 Aug 2022 17:08:05 GMT, Brian Burkhalter wrote: >> For a `String` “s”, `s.indexOf(int)` can never return a value `>= >> s.length()` so change the check >> >> int pos = syntaxAndInput.indexOf(':'); >> if (pos <= 0 || pos == syntaxAndInput.length()) >> >> to >> >>

Re: RFR: 8290047: (fs) FileSystem.getPathMatcher does not check for ":" at last index [v5]

2022-08-02 Thread Roger Riggs
On Tue, 2 Aug 2022 17:08:05 GMT, Brian Burkhalter wrote: >> For a `String` “s”, `s.indexOf(int)` can never return a value `>= >> s.length()` so change the check >> >> int pos = syntaxAndInput.indexOf(':'); >> if (pos <= 0 || pos == syntaxAndInput.length()) >> >> to >> >>

Re: RFR: 8283276: java/io/ObjectStreamClass/ObjectStreamClassCaching.java fails with various GCs

2022-08-02 Thread Roman Kennke
On Fri, 29 Jul 2022 09:05:53 GMT, Peter Levart wrote: > This is a continuation of effort from > https://github.com/openjdk/jdk/pull/9533 to fix the ObjectStreamClassCaching > test which is failing with various GCs != G1. The test class contains 2 test > methods: > - test2CacheReleaseUnderMemor

Re: RFR: 8283276: java/io/ObjectStreamClass/ObjectStreamClassCaching.java fails with various GCs

2022-08-02 Thread Peter Levart
On Fri, 29 Jul 2022 09:05:53 GMT, Peter Levart wrote: > This is a continuation of effort from > https://github.com/openjdk/jdk/pull/9533 to fix the ObjectStreamClassCaching > test which is failing with various GCs != G1. The test class contains 2 test > methods: > - test2CacheReleaseUnderMemor

Re: RFR: 8288327: Executable.hasRealParameterData should not be volatile [v7]

2022-08-02 Thread Peter Levart
On Tue, 2 Aug 2022 16:49:07 GMT, Сергей Цыпанов wrote: >> Сергей Цыпанов has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8288327: Inline privateGetParameters() > > Let's wait a bit @stsypanov Do you need a sponsor or are you waiting for

Re: RFR: 8291508: Fix some tests with "requires vm.jvmti & vm.continuations" [v4]

2022-08-02 Thread Alan Bateman
On Tue, 2 Aug 2022 06:32:09 GMT, Ao Qi wrote: >> `vmTestbase/nsk/jvmti/GetThreadInfo/thrinfo001/TestDescription.java` and >> `vmTestbase/nsk/jvmti/RedefineClasses/StressRedefineVirtual/StressRedefineVirtual.java` >> are added or modified by >> [JDK-8284161](https://bugs.openjdk.org/browse/JDK-

Re: RFR: 8290047: (fs) FileSystem.getPathMatcher does not check for ":" at last index [v5]

2022-08-02 Thread Alan Bateman
On Tue, 2 Aug 2022 17:08:05 GMT, Brian Burkhalter wrote: >> For a `String` “s”, `s.indexOf(int)` can never return a value `>= >> s.length()` so change the check >> >> int pos = syntaxAndInput.indexOf(':'); >> if (pos <= 0 || pos == syntaxAndInput.length()) >> >> to >> >>

Re: RFR: 8290047: (fs) FileSystem.getPathMatcher does not check for ":" at last index [v4]

2022-08-02 Thread Brian Burkhalter
On Tue, 2 Aug 2022 17:01:57 GMT, Brian Burkhalter wrote: >> src/java.base/share/classes/java/nio/file/FileSystem.java line 307: >> >>> 305: * syntax:pattern >>> 306: * >>> 307: * where syntax must not be empty and {@code ':'} stands >>> for itself. >> >> We could flesh this out

Re: RFR: 8290047: (fs) FileSystem.getPathMatcher does not check for ":" at last index [v4]

2022-08-02 Thread Brian Burkhalter
On Tue, 2 Aug 2022 16:44:56 GMT, Alan Bateman wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8290047: Remove check for ':' at last position > > src/java.base/share/classes/java/nio/file/FileSystem.java line 30

Re: RFR: 8290047: (fs) FileSystem.getPathMatcher does not check for ":" at last index [v5]

2022-08-02 Thread Brian Burkhalter
> For a `String` “s”, `s.indexOf(int)` can never return a value `>= s.length()` > so change the check > > int pos = syntaxAndInput.indexOf(':'); > if (pos <= 0 || pos == syntaxAndInput.length()) > > to > > if (pos <= 0) Brian Burkhalter has updated the pull request incr

Re: RFR: 8290488: IBM864 character encoding implementation bug

2022-08-02 Thread Alan Bateman
On Wed, 27 Jul 2022 17:47:36 GMT, Naoto Sato wrote: > Adding an extra c2b mapping for the `%` in `IBM864` charset. The discrepancy > came from the mapping difference between MS and IBM. Marked as reviewed by alanb (Reviewer). - PR: https://git.openjdk.org/jdk/pull/9661

Re: RFR: 8288327: Executable.hasRealParameterData should not be volatile [v7]

2022-08-02 Thread Сергей Цыпанов
On Thu, 30 Jun 2022 12:08:19 GMT, Сергей Цыпанов wrote: >> If there are two threads calling `Executable.hasRealParameterData()` under >> race and the first one writes into volatile `Executable.parameters` field >> (doing _releasing store_) and the second thread reads non-null value from >> the

Re: RFR: 8290047: (fs) FileSystem.getPathMatcher does not check for ":" at last index [v4]

2022-08-02 Thread Alan Bateman
On Tue, 2 Aug 2022 16:18:16 GMT, Brian Burkhalter wrote: >> For a `String` “s”, `s.indexOf(int)` can never return a value `>= >> s.length()` so change the check >> >> int pos = syntaxAndInput.indexOf(':'); >> if (pos <= 0 || pos == syntaxAndInput.length()) >> >> to >> >>

Re: RFR: 8290488: IBM864 character encoding implementation bug

2022-08-02 Thread Naoto Sato
On Tue, 2 Aug 2022 08:35:51 GMT, Alan Bateman wrote: >> Adding an extra c2b mapping for the `%` in `IBM864` charset. The discrepancy >> came from the mapping difference between MS and IBM. > > test/jdk/java/beans/XMLEncoder/Test4625418.java line 26: > >> 24: /* >> 25: * @test >> 26: * @bug 46

Re: RFR: 8290047: (fs) FileSystem.getPathMatcher does not check for ":" at last index [v4]

2022-08-02 Thread Brian Burkhalter
> For a `String` “s”, `s.indexOf(int)` can never return a value `>= s.length()` > so change the check > > int pos = syntaxAndInput.indexOf(':'); > if (pos <= 0 || pos == syntaxAndInput.length()) > > to > > if (pos <= 0) Brian Burkhalter has updated the pull request incr

Withdrawn: 8279031: Add API note to ToolProvider about being reusable/reentrant

2022-08-02 Thread duke
On Mon, 23 May 2022 08:49:27 GMT, Christian Stein wrote: > This commit adds an API note to ToolProvider about being reusable/reentrant. This pull request has been closed without being integrated. - PR: https://git.openjdk.org/jdk/pull/8833

Re: RFR: 8291641: Optimize StackTraceElement.toString() [v6]

2022-08-02 Thread Roger Riggs
On Tue, 2 Aug 2022 15:38:05 GMT, David Schlosnagle wrote: >> I would like to contribute an optimized version of >> `StackTraceElement#toString()` that uses a single StringBuilder throughout >> creation to avoid intermediate `String` allocations. >> `StackTraceElement#toString()` is used in a n

Re: RFR: 8291641: Optimize StackTraceElement.toString() [v4]

2022-08-02 Thread David Schlosnagle
On Tue, 2 Aug 2022 14:13:25 GMT, Roger Riggs wrote: >> David Schlosnagle has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Inline max Integer.stringSize > > Are there existing tests that validate the formatted results? > If so, add this b

Re: RFR: 8291641: Optimize StackTraceElement.toString() [v6]

2022-08-02 Thread David Schlosnagle
> I would like to contribute an optimized version of > `StackTraceElement#toString()` that uses a single StringBuilder throughout > creation to avoid intermediate `String` allocations. > `StackTraceElement#toString()` is used in a number of JDK code paths > including `Throwable#printStackTrace(

Re: RFR: 8290047: (fs) FileSystem.getPathMatcher does not check for ":" at last index [v3]

2022-08-02 Thread Brian Burkhalter
On Tue, 2 Aug 2022 11:56:03 GMT, Alan Bateman wrote: > [...] I agree it's not worth it and maybe we just drop the check as per the > JBS issue and update the spec to document the long standing behavior. Agreed. - PR: https://git.openjdk.org/jdk/pull/9595

Re: RFR: 8291641: Optimize StackTraceElement.toString() [v5]

2022-08-02 Thread David Schlosnagle
> I would like to contribute an optimized version of > `StackTraceElement#toString()` that uses a single StringBuilder throughout > creation to avoid intermediate `String` allocations. > `StackTraceElement#toString()` is used in a number of JDK code paths > including `Throwable#printStackTrace(

Re: RFR: 8291360: Create entry points to expose low-level class file information [v3]

2022-08-02 Thread Roger Riggs
On Tue, 2 Aug 2022 14:12:44 GMT, Harold Seigel wrote: >> Please review this change to fix JDK-8291360. This fix adds entry points >> getClassFileVersion() and getClassAccessFlagsRaw() to class java.lang.Class. >> The new entry points return the current class's class file version and its >> r

Re: RFR: 8291641: Optimize StackTraceElement.toString() [v4]

2022-08-02 Thread Roger Riggs
On Tue, 2 Aug 2022 13:58:52 GMT, David Schlosnagle wrote: >> I would like to contribute an optimized version of >> `StackTraceElement#toString()` that uses a single StringBuilder throughout >> creation to avoid intermediate `String` allocations. >> `StackTraceElement#toString()` is used in a n

Re: RFR: 8291360: Create entry points to expose low-level class file information [v3]

2022-08-02 Thread Harold Seigel
On Tue, 2 Aug 2022 06:36:54 GMT, David Holmes wrote: >> No particular reason for choosing 59 other than it's different and less than >> 64. Test case Version64_65535 has a non-zero minor version. > > I think we should be testing for other real classfile versions that may be > encountered, such

Re: RFR: 8291360: Create entry points to expose low-level class file information [v2]

2022-08-02 Thread Harold Seigel
On Tue, 2 Aug 2022 06:24:10 GMT, David Holmes wrote: >> Harold Seigel has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Improved tests, added mulit-dimensional array tests, simplified new >> java.lang.Class API's > > src/java.base/share/c

Re: RFR: 8291360: Create entry points to expose low-level class file information [v3]

2022-08-02 Thread Harold Seigel
> Please review this change to fix JDK-8291360. This fix adds entry points > getClassFileVersion() and getClassAccessFlagsRaw() to class java.lang.Class. > The new entry points return the current class's class file version and its > raw access flags. > > The fix was tested by running Mach5 ti

Re: RFR: 8291641: Optimize StackTraceElement.toString() [v3]

2022-08-02 Thread David Schlosnagle
On Tue, 2 Aug 2022 13:52:30 GMT, Quan Anh Mai wrote: >> David Schlosnagle has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Estimate length > > src/java.base/share/classes/java/lang/StackTraceElement.java line 365: > >> 363:

Re: RFR: 8291641: Optimize StackTraceElement.toString() [v4]

2022-08-02 Thread David Schlosnagle
> I would like to contribute an optimized version of > `StackTraceElement#toString()` that uses a single StringBuilder throughout > creation to avoid intermediate `String` allocations. > `StackTraceElement#toString()` is used in a number of JDK code paths > including `Throwable#printStackTrace(

Re: RFR: JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort) [v16]

2022-08-02 Thread iaroslavski
> Sorting: > > - adopt radix sort for sequential and parallel sorts on int/long/float/double > arrays (almost random and length > 6K) > - fix tryMergeRuns() to better handle case when the last run is a single > element > - minor javadoc and comment changes > > Testing: > - add new data inputs i

Re: RFR: 8291641: Optimize StackTraceElement.toString() [v3]

2022-08-02 Thread Quan Anh Mai
On Tue, 2 Aug 2022 13:34:26 GMT, David Schlosnagle wrote: >> I would like to contribute an optimized version of >> `StackTraceElement#toString()` that uses a single StringBuilder throughout >> creation to avoid intermediate `String` allocations. >> `StackTraceElement#toString()` is used in a n

Re: RFR: 8291641: Optimize StackTraceElement.toString() [v2]

2022-08-02 Thread David Schlosnagle
On Tue, 2 Aug 2022 05:29:38 GMT, Quan Anh Mai wrote: >> David Schlosnagle has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Address comments > > Since constructing a `String` from a `StringBuilder` requires an array copy > anyway, you don

Re: RFR: 8291641: Optimize StackTraceElement.toString() [v3]

2022-08-02 Thread David Schlosnagle
> I would like to contribute an optimized version of > `StackTraceElement#toString()` that uses a single StringBuilder throughout > creation to avoid intermediate `String` allocations. > `StackTraceElement#toString()` is used in a number of JDK code paths > including `Throwable#printStackTrace(

Re: RFR: 8291360: Create entry points to expose low-level class file information [v2]

2022-08-02 Thread Harold Seigel
On Tue, 2 Aug 2022 06:51:46 GMT, David Holmes wrote: >> Changed to display as major:minor version. > > Seems odd to display as major:minor when it is stored as minor:major I think it seems more natural to display the major version first, but I can change it if you prefer. - PR: ht

Re: RFR: 8290047: (fs) FileSystem.getPathMatcher does not check for ":" at last index [v3]

2022-08-02 Thread Alan Bateman
On Mon, 1 Aug 2022 19:59:33 GMT, Brian Burkhalter wrote: > The existing code downstream of the check handles an empty glob or regex > pattern as matching the empty string. > If I read it correctly, it will now throw an exception instead of not > matching. It might be safer to not change that be

Re: RFR: 8290488: IBM864 character encoding implementation bug

2022-08-02 Thread Alan Bateman
On Wed, 27 Jul 2022 17:47:36 GMT, Naoto Sato wrote: > Adding an extra c2b mapping for the `%` in `IBM864` charset. The discrepancy > came from the mapping difference between MS and IBM. test/jdk/java/beans/XMLEncoder/Test4625418.java line 26: > 24: /* > 25: * @test > 26: * @bug 4625418 82399

Re: RFR: 8291360: Create entry points to expose low-level class file information [v2]

2022-08-02 Thread David Holmes
On Tue, 2 Aug 2022 06:38:11 GMT, David Holmes wrote: >> Harold Seigel has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Improved tests, added mulit-dimensional array tests, simplified new >> java.lang.Class API's > > test/hotspot/jtreg/ru