Re: The introduction of Sequenced collections is not a source compatible change

2023-05-11 Thread Joseph D. Darcy
PPS Various compatibility topics were covered in a talk I gave at the JCP EC in April this year: "Contributing to OpenJDK: Participating in stewardship for the long-term" https://jcp.org/aboutJava/communityprocess/ec-public/materials/2023-04-12/Contributing_to_OpenJDK_2023_04_12.pdf -Joe On 5/

Integrated: 8307966: ProblemList java/util/concurrent/locks/Lock/OOMEInAQS.java on linux-x64

2023-05-11 Thread Daniel D . Daugherty
On Fri, 12 May 2023 00:05:21 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList java/util/concurrent/locks/Lock/OOMEInAQS.java > on linux-x64. This pull request has now been integrated. Changeset: 9a7b4431 Author:Daniel D. Daugherty URL: https://git.openjdk.org/jdk/com

Re: RFR: 8307966: ProblemList java/util/concurrent/locks/Lock/OOMEInAQS.java on linux-x64

2023-05-11 Thread Daniel D . Daugherty
On Fri, 12 May 2023 00:05:21 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList java/util/concurrent/locks/Lock/OOMEInAQS.java > on linux-x64. I've switched to using 'linux-all' instead of enumeration of the platforms. - PR Comment: https://git.openjdk.org/jdk/pull/13

Re: RFR: 8307966: ProblemList java/util/concurrent/locks/Lock/OOMEInAQS.java on linux-x64 [v2]

2023-05-11 Thread Daniel D . Daugherty
> A trivial fix to ProblemList java/util/concurrent/locks/Lock/OOMEInAQS.java > on linux-x64. Daniel D. Daugherty has updated the pull request incrementally with one additional commit since the last revision: plummercj CR - use linux-all instead - Changes: - all: https://git.o

Re: RFR: 8307966: ProblemList java/util/concurrent/locks/Lock/OOMEInAQS.java on linux-x64

2023-05-11 Thread Leonid Mesnik
On Fri, 12 May 2023 00:05:21 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList java/util/concurrent/locks/Lock/OOMEInAQS.java > on linux-x64. Marked as reviewed by lmesnik (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/13946#pullrequestreview-1423608862

Re: RFR: 8307966: ProblemList java/util/concurrent/locks/Lock/OOMEInAQS.java on linux-x64

2023-05-11 Thread Daniel D . Daugherty
On Fri, 12 May 2023 00:15:25 GMT, Leonid Mesnik wrote: >> A trivial fix to ProblemList java/util/concurrent/locks/Lock/OOMEInAQS.java >> on linux-x64. > > Might be this failure is platform agnostic and should be generic all. We just > don't run this combination on macosx so often. ( @lmesnik -

Re: RFR: 8307966: ProblemList java/util/concurrent/locks/Lock/OOMEInAQS.java on linux-x64

2023-05-11 Thread Leonid Mesnik
On Fri, 12 May 2023 00:05:21 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList java/util/concurrent/locks/Lock/OOMEInAQS.java > on linux-x64. Might be this failure is platform agnostic and should be generic all. We just don't run this combination on macosx so often. ( --

Re: RFR: 8307966: ProblemList java/util/concurrent/locks/Lock/OOMEInAQS.java on linux-x64

2023-05-11 Thread Naoto Sato
On Fri, 12 May 2023 00:05:21 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList java/util/concurrent/locks/Lock/OOMEInAQS.java > on linux-x64. Marked as reviewed by naoto (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/13946#pullrequestreview-142360

Re: RFR: 8307966: ProblemList java/util/concurrent/locks/Lock/OOMEInAQS.java on linux-x64

2023-05-11 Thread Daniel D . Daugherty
On Fri, 12 May 2023 00:09:12 GMT, Chris Plummer wrote: >> A trivial fix to ProblemList java/util/concurrent/locks/Lock/OOMEInAQS.java >> on linux-x64. > > Maybe linux-all would be better. @plummercj - Thanks for the review. 'linux-all' would make it apply to linux versions that we don't have. I

Re: RFR: 8307966: ProblemList java/util/concurrent/locks/Lock/OOMEInAQS.java on linux-x64

2023-05-11 Thread Chris Plummer
On Fri, 12 May 2023 00:05:21 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList java/util/concurrent/locks/Lock/OOMEInAQS.java > on linux-x64. Maybe linux-all would be better. - PR Comment: https://git.openjdk.org/jdk/pull/13946#issuecomment-1544916181

RFR: 8307966: ProblemList java/util/concurrent/locks/Lock/OOMEInAQS.java on linux-x64

2023-05-11 Thread Daniel D . Daugherty
A trivial fix to ProblemList java/util/concurrent/locks/Lock/OOMEInAQS.java on linux-x64. - Commit messages: - 8307966: ProblemList java/util/concurrent/locks/Lock/OOMEInAQS.java on linux-x64 Changes: https://git.openjdk.org/jdk/pull/13946/files Webrev: https://webrevs.openjdk.or

Re: RFR: 8307961: java/foreign/enablenativeaccess/TestEnableNativeAccess.java fails with ShouldNotReachHere

2023-05-11 Thread Jorn Vernee
On Thu, 11 May 2023 21:29:51 GMT, Maurizio Cimadamore wrote: > This patch fixes the JNI test for the enable native access flag, which was > updated incorrectly as part of https://git.openjdk.org/jdk/pull/13863. > > The problem is that the test doesn't make global references out of the local >

Re: RFR: 8306597: Improve string formatting in EquivMapsGenerator.java [v3]

2023-05-11 Thread Justin Lu
> Please review changes to `EquivMapsGenerator.java` (which is used to generate > the Locale equivalencies for the JDK). > > The file previously used large concatenated Strings, which are now replaced > with text blocks, in addition to some cleanup. No functionality is changed, > the Locale equ

Re: RFR: 8306597: Improve string formatting in EquivMapsGenerator.java [v2]

2023-05-11 Thread Justin Lu
On Thu, 11 May 2023 20:34:48 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with three additional >> commits since the last revision: >> >> - Adjust new lines to appease jcheck? >> - Review: remove new line literals for new lines >> - Review: fix method / var

Re: RFR: 8306597: Improve string formatting in EquivMapsGenerator.java [v2]

2023-05-11 Thread Justin Lu
> Please review changes to `EquivMapsGenerator.java` (which is used to generate > the Locale equivalencies for the JDK). > > The file previously used large concatenated Strings, which are now replaced > with text blocks, in addition to some cleanup. No functionality is changed, > the Locale equ

RFR: 8307961: java/foreign/enablenativeaccess/TestEnableNativeAccess.java fails with ShouldNotReachHere

2023-05-11 Thread Maurizio Cimadamore
This patch fixes the JNI test for the enable native access flag, which was updated incorrectly as part of https://git.openjdk.org/jdk/pull/13863. The problem is that the test doesn't make global references out of the local ones before sharing them with another thread. I could reproduce the fail

Re: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native [v6]

2023-05-11 Thread Naoto Sato
On Thu, 11 May 2023 20:21:57 GMT, Justin Lu wrote: >> This PR converts Unicode sequences to UTF-8 native in .properties file. >> (Excluding the Unicode space and tab sequence). The conversion was done >> using native2ascii. >> >> In addition, the build logic is adjusted to support reading in t

Re: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native [v6]

2023-05-11 Thread Justin Lu
On Thu, 11 May 2023 20:21:57 GMT, Justin Lu wrote: >> This PR converts Unicode sequences to UTF-8 native in .properties file. >> (Excluding the Unicode space and tab sequence). The conversion was done >> using native2ascii. >> >> In addition, the build logic is adjusted to support reading in t

Re: RFR: 6714245: [Col] Collator - Faster Comparison for identical strings.

2023-05-11 Thread Justin Lu
On Thu, 11 May 2023 20:37:11 GMT, Naoto Sato wrote: >> Please review this PR which adds an initial equality check to >> `RuleBasedCollator.compare(String source, String target)`. >> >> This speeds up the operation for equal input Strings, as it bypasses >> Collator rule comparisons of each ele

Re: RFR: 8307547: Support variant collations [v4]

2023-05-11 Thread Naoto Sato
> The fix to https://bugs.openjdk.org/browse/JDK-8306927 switched the default > collation for Swedish to the modern one. In order to provide a means for > users who need the old collation, this PR intends to make `Collator` > recognize the `co` Unicode locale extension so that multiple implement

Re: RFR: 8300794: Use @snippet in java.util:i18n [v2]

2023-05-11 Thread Justin Lu
On Thu, 11 May 2023 20:21:55 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Review: Move links on top, fix indentation in example > > src/java.base/share/classes/java/util/ResourceBundle.java line 512

Re: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native [v6]

2023-05-11 Thread Justin Lu
> This PR converts Unicode sequences to UTF-8 native in .properties file. > (Excluding the Unicode space and tab sequence). The conversion was done using > native2ascii. > > In addition, the build logic is adjusted to support reading in the > .properties files as UTF-8 during the conversion fro

Re: RFR: 8300794: Use @snippet in java.util:i18n [v2]

2023-05-11 Thread Justin Lu
> Please review this javadoc only change which uses `@snippet` and `@linkplain` > in i18n related util packages. Justin Lu has updated the pull request incrementally with one additional commit since the last revision: Review: Move links on top, fix indentation in example - Chang

Re: RFR: 8300794: Use @snippet in java.util:i18n

2023-05-11 Thread Naoto Sato
On Wed, 10 May 2023 23:54:37 GMT, Justin Lu wrote: > Please review this javadoc only change which uses `@snippet` and `@linkplain` > in i18n related util packages. Looks good overall. Some minor comments follow. src/java.base/share/classes/java/util/Currency.java line 517: > 515: * If th

Re: RFR: 6714245: [Col] Collator - Faster Comparison for identical strings.

2023-05-11 Thread Naoto Sato
On Thu, 11 May 2023 18:27:28 GMT, Justin Lu wrote: > Please review this PR which adds an initial equality check to > `RuleBasedCollator.compare(String source, String target)`. > > This speeds up the operation for equal input Strings, as it bypasses Collator > rule comparisons of each element f

Re: RFR: 8306597: Improve string formatting in EquivMapsGenerator.java

2023-05-11 Thread Naoto Sato
On Thu, 11 May 2023 15:40:50 GMT, Justin Lu wrote: > Please review changes to `EquivMapsGenerator.java` (which is used to generate > the Locale equivalencies for the JDK). > > The file previously used large concatenated Strings, which are now replaced > with text blocks, in addition to some cl

Re: RFR: 6714245: [Col] Collator - Faster Comparison for identical strings.

2023-05-11 Thread Roger Riggs
On Thu, 11 May 2023 18:27:28 GMT, Justin Lu wrote: > Please review this PR which adds an initial equality check to > `RuleBasedCollator.compare(String source, String target)`. > > This speeds up the operation for equal input Strings, as it bypasses Collator > rule comparisons of each element f

Re: RFR: 8307535: java.util.logging.Handlers should be more VirtualThread friendly [v3]

2023-05-11 Thread Daniel Fuchs
On Fri, 5 May 2023 18:38:28 GMT, Daniel Fuchs wrote: >> Several Handlers class use monitors to synchronize when formatting / >> publishing LogRecords. >> When logging within a VirtualThread, holding this monitor can cause the >> carrier thread to be pinned. >> Handlers could use jdk.internal.mi

Re: RFR: 8307535: java.util.logging.Handlers should be more VirtualThread friendly [v4]

2023-05-11 Thread Daniel Fuchs
> Several Handlers class use monitors to synchronize when formatting / > publishing LogRecords. > When logging within a VirtualThread, holding this monitor can cause the > carrier thread to be pinned. > Handlers could use jdk.internal.misc.InternalLock, in a similar way to some > java.io classes

RFR: 6714245: [Col] Collator - Faster Comparison for identical strings.

2023-05-11 Thread Justin Lu
Please review this PR which adds an initial equality check to `RuleBasedCollator.compare(String source, String target)`. This speeds up the operation for equal input Strings, as it bypasses Collator rule comparisons of each element for both of the input Strings. - Commit messages:

Re: RFR: 8307547: Support for multiple collations for a locale [v3]

2023-05-11 Thread Naoto Sato
> The fix to https://bugs.openjdk.org/browse/JDK-8306927 switched the default > collation for Swedish to the modern one. In order to provide a means for > users who need the old collation, this PR intends to make `Collator` > recognize the `co` Unicode locale extension so that multiple implement

Re: RFR: 8307547: Support for multiple collations for a locale [v2]

2023-05-11 Thread Naoto Sato
On Thu, 11 May 2023 09:44:34 GMT, Alan Bateman wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> http -> https > > src/java.base/share/classes/java/text/Collator.java line 131: > >> 129: * >> 130: * may return a {@

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch [v10]

2023-05-11 Thread Jan Lahoda
> This is the first draft of a patch for JEP 440 and JEP 441. Changes included: > > - the pattern matching for switch and record patterns features are made > final, together with updates to tests. > - parenthesized patterns are removed. > - qualified enum constants are supported for case label

RFR: 8306597: Improve string formatting in EquivMapsGenerator.java

2023-05-11 Thread Justin Lu
Please review changes to `EquivMapsGenerator.java` (which is used to generate the Locale equivalencies for the JDK). The file previously used large concatenated Strings, which are now replaced with text blocks, in addition to some cleanup. No functionality is changed, `EquivMapsGenerator.java`

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v13]

2023-05-11 Thread Jim Laskey
> Add flexible main methods and anonymous main classes to the Java language. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Update VirtualParser.java - Changes: - all: https://git.openjdk.org/jdk/pull/13689/files - ne

Re: RFR: 8307535: java.util.logging.Handlers should be more VirtualThread friendly [v3]

2023-05-11 Thread Daniel Fuchs
On Thu, 11 May 2023 10:24:34 GMT, Jaikiran Pai wrote: >> Ah - I see that `PrintStream` lock can be accessed through SharedSecrets... >> Hmmm. OK - then maybe I should leave InternalLock alone and just use >> ReentrantLock. Let me prototype that. > >> Ah - I see that PrintStream lock can be acce

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v12]

2023-05-11 Thread Jim Laskey
> Add flexible main methods and anonymous main classes to the Java language. Jim Laskey has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 26 commits: - Merge branch 'master' into 8306112 - Refactor source code launcher - Typo - Reco

Re: RFR: 8307535: java.util.logging.Handlers should be more VirtualThread friendly [v3]

2023-05-11 Thread Jaikiran Pai
On Thu, 11 May 2023 10:15:49 GMT, Daniel Fuchs wrote: > Ah - I see that PrintStream lock can be accessed through SharedSecrets I think Alan was talking about the protected Object lock on `java.io.Reader` and `java.io.Writer` classes which can be manipulated by their sub-classes and that's wh

Re: RFR: 8307535: java.util.logging.Handlers should be more VirtualThread friendly [v3]

2023-05-11 Thread Daniel Fuchs
On Thu, 11 May 2023 10:13:04 GMT, Daniel Fuchs wrote: >>> It's the same reason here: in these classes (and before that change) the >>> lock is `this` which is always exposed to subclasses or external classes. >>> If a handler uses `InternalLock`, and an external class >>> `synchronize(handler)

Re: RFR: 8307535: java.util.logging.Handlers should be more VirtualThread friendly [v3]

2023-05-11 Thread Daniel Fuchs
On Thu, 11 May 2023 08:51:45 GMT, Alan Bateman wrote: >> I can revert to using plain `ReentrantLock` if you think it's preferable. > >> It's the same reason here: in these classes (and before that change) the >> lock is `this` which is always exposed to subclasses or external classes. If >> a h

RFR: 8307911: javadoc for MemorySegment::reinterpret has duplicate restricted method paragraph

2023-05-11 Thread Maurizio Cimadamore
As the title says, this patch fixes an issue with `MemorySegment::reinterpet`, which reports the customary "restricted method" section twice. I also fixed some wrong capitalization in the text of the factories in `Linker.Option`. - Commit messages: - Initial push Changes: https:/

Re: RFR: 8302987: Add uniform and spatially equidistributed bounded double streams to RandomGenerator [v9]

2023-05-11 Thread Raffaello Giulietti
> The `default` method `nextDouble(double origin, double bound)` in > `java.util.random.RandomGenerator` aims at generating a uniformly and > spatially equidistributed random `double` in the left-closed and right-open > range [`origin`, `bound`). It does so by applying the affine transform > `o

Integrated: 8307610: Linker::nativeLinker should not be restricted (mainline)

2023-05-11 Thread Maurizio Cimadamore
On Mon, 8 May 2023 11:10:36 GMT, Maurizio Cimadamore wrote: > Port of: https://git.openjdk.org/panama-foreign/pull/831 This pull request has now been integrated. Changeset: ba9714d4 Author:Maurizio Cimadamore URL: https://git.openjdk.org/jdk/commit/ba9714d44ceabdb98078a4338fb8e8a3e

Re: RFR: 8307547: Support for multiple collations for a locale [v2]

2023-05-11 Thread Alan Bateman
On Wed, 10 May 2023 20:28:11 GMT, Naoto Sato wrote: >> The fix to https://bugs.openjdk.org/browse/JDK-8306927 switched the default >> collation for Swedish to the modern one. In order to provide a means for >> users who need the old collation, this PR intends to make `Collator` >> recognize th

Re: RFR: 8132995: Matcher$ImmutableMatchResult should be optimized to reduce space usage [v2]

2023-05-11 Thread Raffaello Giulietti
> When appropriate and useful, copies only the relevant portion of the > `CharSequence` to the match result. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: Added some randomness in tests. - Changes: - all: htt

Re: RFR: 8307535: java.util.logging.Handlers should be more VirtualThread friendly [v3]

2023-05-11 Thread Alan Bateman
On Thu, 11 May 2023 07:52:51 GMT, Daniel Fuchs wrote: >> It's the same reason here: in these classes (and before that change) the >> lock is `this` which is always exposed to subclasses or external classes. If >> a handler uses `InternalLock`, and an external class `synchronize(handler)` >> th

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v22]

2023-05-11 Thread Richard Reingruber
On Wed, 10 May 2023 22:30:13 GMT, Martin Doerr wrote: >> Ok, since this is loading a `long` (which represents an address that points >> into the code cache) I think we're fine without using the access API then? > > Correct. The code had been written for the previous version of Shenandoah > (1.0

Re: RFR: 8307535: java.util.logging.Handlers should be more VirtualThread friendly [v3]

2023-05-11 Thread Daniel Fuchs
On Fri, 5 May 2023 18:38:28 GMT, Daniel Fuchs wrote: >> Several Handlers class use monitors to synchronize when formatting / >> publishing LogRecords. >> When logging within a VirtualThread, holding this monitor can cause the >> carrier thread to be pinned. >> Handlers could use jdk.internal.mi

Re: RFR: 8307535: java.util.logging.Handlers should be more VirtualThread friendly [v3]

2023-05-11 Thread Daniel Fuchs
On Thu, 11 May 2023 07:28:03 GMT, Alan Bateman wrote: >> Daniel Fuchs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use locks consistently > > src/java.logging/share/classes/java/util/logging/Handler.java line 88: > >> 86:

Re: RFR: 8307535: java.util.logging.Handlers should be more VirtualThread friendly [v3]

2023-05-11 Thread Daniel Fuchs
On Thu, 11 May 2023 07:51:12 GMT, Daniel Fuchs wrote: >> src/java.logging/share/classes/java/util/logging/Handler.java line 88: >> >>> 86: return null; >>> 87: } else { >>> 88: return InternalLock.newLockOrNull(); >> >> I'm surprised to see InternalLock used here

Re: RFR: 8307535: java.util.logging.Handlers should be more VirtualThread friendly [v3]

2023-05-11 Thread Alan Bateman
On Fri, 5 May 2023 18:38:28 GMT, Daniel Fuchs wrote: >> Several Handlers class use monitors to synchronize when formatting / >> publishing LogRecords. >> When logging within a VirtualThread, holding this monitor can cause the >> carrier thread to be pinned. >> Handlers could use jdk.internal.mi

Re: RFR: 8307535: java.util.logging.Handlers should be more VirtualThread friendly

2023-05-11 Thread Jaikiran Pai
On Fri, 5 May 2023 13:53:51 GMT, Daniel Fuchs wrote: > Something I was wondering: > Use of InternalLock can be disabled with -Djdk.io.useMonitors=true > But should we have a property to force the use of InternalLock (when enabled) > even in the presence of custom handlers subclasses? We could

Re: RFR: 8307535: java.util.logging.Handlers should be more VirtualThread friendly [v3]

2023-05-11 Thread Jaikiran Pai
On Fri, 5 May 2023 18:38:28 GMT, Daniel Fuchs wrote: >> Several Handlers class use monitors to synchronize when formatting / >> publishing LogRecords. >> When logging within a VirtualThread, holding this monitor can cause the >> carrier thread to be pinned. >> Handlers could use jdk.internal.mi