Re: RFR: 8304914: Use OperatingSystem, Architecture, and Version in jpackage [v2]

2023-05-12 Thread Alexander Matveev
On Fri, 5 May 2023 14:12:21 GMT, Roger Riggs wrote: >> Refactor the Platform class in jdk.jpackage to use the internal >> OperatingSystem, Architecture, and Version classes. >> The OperatingSystem.isXXX() and Architecture.isYYY() methods replace >> comparisons in the Platform class. >> The

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it

2023-05-12 Thread Roger Riggs
On Fri, 12 May 2023 15:24:19 GMT, Volker Simonis wrote: > Since JDK13, executing commands in a sub-process defaults to the so called > `POSIX_SPAWN` launching mechanism (i.e. > `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by > using `posix_spawn(3)` to firstly start

Re: RFR: 8284493: Improve computeNextExponential tail performance and accuracy [v20]

2023-05-12 Thread GuySteele
On Fri, 12 May 2023 20:41:32 GMT, Chris Hennick wrote: >> This PR improves both the worst-case performance of `nextExponential` and >> `nextGaussian` and the distribution of output at the tails. It fixes the >> following imperfections: >> >> * Repeatedly adding

Re: RFR: 8299340: CreateProcessW lpCommandLine must be mutable [v2]

2023-05-12 Thread Naoto Sato
On Fri, 12 May 2023 19:38:53 GMT, Roger Riggs wrote: >> Launching of processes on Windows using `ProcessCreateW` with a Unicode >> character set requires the buffer to be writable. An access violation might >> occur if `ProcessCreateW` writes to the command line string. The current >>

Re: RFR: 8284493: Improve computeNextExponential tail performance and accuracy [v19]

2023-05-12 Thread Chris Hennick
On Thu, 6 Apr 2023 18:07:29 GMT, Chris Hennick wrote: >> This PR improves both the worst-case performance of `nextExponential` and >> `nextGaussian` and the distribution of output at the tails. It fixes the >> following imperfections: >> >> * Repeatedly adding

Re: RFR: 8284493: Improve computeNextExponential tail performance and accuracy [v20]

2023-05-12 Thread Chris Hennick
> This PR improves both the worst-case performance of `nextExponential` and > `nextGaussian` and the distribution of output at the tails. It fixes the > following imperfections: > > * Repeatedly adding DoubleZigguratTables.exponentialX0 to extra causes a > rounding error to accumulate at the

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

2023-05-12 Thread Justin Lu
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

Re: RFR: 8304914: Use OperatingSystem, Architecture, and Version in jpackage [v2]

2023-05-12 Thread Alexey Semenyuk
On Fri, 5 May 2023 14:12:21 GMT, Roger Riggs wrote: >> Refactor the Platform class in jdk.jpackage to use the internal >> OperatingSystem, Architecture, and Version classes. >> The OperatingSystem.isXXX() and Architecture.isYYY() methods replace >> comparisons in the Platform class. >> The

Re: RFR: 8284493: Improve computeNextExponential tail performance and accuracy [v19]

2023-05-12 Thread GuySteele
On Thu, 6 Apr 2023 18:07:29 GMT, Chris Hennick wrote: >> This PR improves both the worst-case performance of `nextExponential` and >> `nextGaussian` and the distribution of output at the tails. It fixes the >> following imperfections: >> >> * Repeatedly adding

RFR: 8308022: update for deprecated sprintf for java.base

2023-05-12 Thread Xue-Lei Andrew Fan
Hi, May I have this update reviewed? The sprintf is deprecated in Xcode 14, and Microsoft Virtual Studio, because of security concerns. The issue was addressed in [JDK-8296812](https://bugs.openjdk.org/browse/JDK-8296812) for building failure, and

Re: RFR: 8299340: CreateProcessW lpCommandLine must be mutable [v2]

2023-05-12 Thread Roger Riggs
> Launching of processes on Windows using `ProcessCreateW` with a Unicode > character set requires the buffer to be writable. An access violation might > occur if `ProcessCreateW` writes to the command line string. The current > implementation fetches the command line string using JNI

Re: RFR: 8305895: Implementation: JEP 450: Compact Object Headers (Experimental)

2023-05-12 Thread Roman Kennke
On Fri, 12 May 2023 18:03:13 GMT, Coleen Phillimore wrote: >> This is the main body of the JEP 450: Compact Object Headers (Experimental). >> >> Main changes: >> - Introduction of the (experimental) flag UseCompactObjectHeaders. All >> changes in this PR are protected by this flag. >> - The

Re: RFR: 8305895: Implementation: JEP 450: Compact Object Headers (Experimental)

2023-05-12 Thread Coleen Phillimore
On Fri, 12 May 2023 17:27:25 GMT, Roman Kennke wrote: > This is the main body of the JEP 450: Compact Object Headers (Experimental). > > Main changes: > - Introduction of the (experimental) flag UseCompactObjectHeaders. All > changes in this PR are protected by this flag. > - The compressed

RFR: 8305895: Implementation: JEP 450: Compact Object Headers (Experimental)

2023-05-12 Thread Roman Kennke
This is the main body of the JEP 450: Compact Object Headers (Experimental). Main changes: - Introduction of the (experimental) flag UseCompactObjectHeaders. All changes in this PR are protected by this flag. - The compressed Klass* can now be stored in the mark-word of objects. In order to

Re: RFR: 8308016: Use snippets in java.io package [v2]

2023-05-12 Thread Brian Burkhalter
> Replace `{@code ...}` patterns and the like with `{@snippet > lang=java : ...}`. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8308016: Remove ellipses ("...") from snippets - Changes: - all:

Re: RFR: 8299340: CreateProcessW lpCommandLine must be mutable

2023-05-12 Thread Roger Riggs
On Fri, 12 May 2023 17:56:08 GMT, Naoto Sato wrote: >> Launching of processes on Windows using `ProcessCreateW` with a Unicode >> character set requires the buffer to be writable. An access violation might >> occur if `ProcessCreateW` writes to the command line string. The current >>

Re: RFR: 8308021: Update IANA Language Subtag Registry to Version 2023-05-11

2023-05-12 Thread Naoto Sato
On Fri, 12 May 2023 17:56:12 GMT, Justin Lu wrote: > Please review this trivial fix which updates the IANA data to version > 5/11/2023. As the update only includes variant sub-tags, there is no impact > to JDK tests. The update can be found >

Re: RFR: 8308021: Update IANA Language Subtag Registry to Version 2023-05-11

2023-05-12 Thread Lance Andersen
On Fri, 12 May 2023 17:56:12 GMT, Justin Lu wrote: > Please review this trivial fix which updates the IANA data to version > 5/11/2023. As the update only includes variant sub-tags, there is no impact > to JDK tests. The update can be found >

Re: RFR: 8308016: Use snippets in java.io package

2023-05-12 Thread Lance Andersen
On Fri, 12 May 2023 17:52:29 GMT, Brian Burkhalter wrote: >> src/java.base/share/classes/java/io/Console.java line 124: >> >>> 122: * if (con != null) { >>> 123: * Scanner sc = new Scanner(con.reader()); >>> 124: * ... >> >> I'm not sure how you

RFR: 8308021: Update IANA Language Subtag Registry to Version 2023-05-11

2023-05-12 Thread Justin Lu
Please review this trivial fix which updates the IANA data to version 5/11/2023. As the update only includes variant sub-tags, there is no impact to JDK tests. The update can be found [here](https://mm.icann.org/pipermail/ietf-languages-announcements/2023-May/87.html). -

Re: RFR: 8299340: CreateProcessW lpCommandLine must be mutable

2023-05-12 Thread Naoto Sato
On Tue, 9 May 2023 21:46:51 GMT, Roger Riggs wrote: > Launching of processes on Windows using `ProcessCreateW` with a Unicode > character set requires the buffer to be writable. An access violation might > occur if `ProcessCreateW` writes to the command line string. The current >

Re: RFR: 8308016: Use snippets in java.io package

2023-05-12 Thread Brian Burkhalter
On Fri, 12 May 2023 17:31:32 GMT, Justin Lu wrote: >> Replace `{@code ...}` patterns and the like with `{@snippet >> lang=java : ...}`. > > src/java.base/share/classes/java/io/Console.java line 124: > >> 122: * if (con != null) { >> 123: * Scanner sc = new

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

2023-05-12 Thread Justin Lu
On Thu, 11 May 2023 20:51:37 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

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

2023-05-12 Thread Naoto Sato
On Fri, 12 May 2023 17:25:45 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

RFR: 8299340: CreateProcessW lpCommandLine must be mutable

2023-05-12 Thread Roger Riggs
Launching of processes on Windows using `ProcessCreateW` with a Unicode character set requires the buffer to be writable. An access violation might occur if `ProcessCreateW` writes to the command line string. The current implementation fetches the command line string using JNI GetStringChars

Re: RFR: 8308016: Use snippets in java.io package

2023-05-12 Thread Justin Lu
On Fri, 12 May 2023 16:17:38 GMT, Brian Burkhalter wrote: > Replace `{@code ...}` patterns and the like with `{@snippet > lang=java : ...}`. src/java.base/share/classes/java/io/Console.java line 124: > 122: * if (con != null) { > 123: * Scanner sc = new

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

2023-05-12 Thread Justin Lu
On Fri, 12 May 2023 16:41:18 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove more ws in text block > > make/jdk/src/classes/build/tools/generatelsrequivmaps/EquivMapsGenerator.java > line 344:

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

2023-05-12 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

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

2023-05-12 Thread Steven Loomis
On Fri, 12 May 2023 16:41:20 GMT, Steven Loomis wrote: >>> I'm just wondering where a developer might go to get a definitive list, >>> i.e. aside from this API note, how would they know that "-trad" or >>> "-traditional" can be used to configure the ordering. Locale.forLanguageTag >>>

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

2023-05-12 Thread Naoto Sato
On Fri, 12 May 2023 16:41:20 GMT, Steven Loomis wrote: >>> I'm just wondering where a developer might go to get a definitive list, >>> i.e. aside from this API note, how would they know that "-trad" or >>> "-traditional" can be used to configure the ordering. Locale.forLanguageTag >>>

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

2023-05-12 Thread Lance Andersen
On Thu, 11 May 2023 20:39:57 GMT, Justin Lu wrote: >> 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:

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

2023-05-12 Thread Naoto Sato
On Thu, 11 May 2023 22:23:47 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

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

2023-05-12 Thread Steven Loomis
On Fri, 12 May 2023 16:32:57 GMT, Naoto Sato wrote: > > I'm just wondering where a developer might go to get a definitive list, > > i.e. aside from this API note, how would they know that "-trad" or > > "-traditional" can be used to configure the ordering. Locale.forLanguageTag > > supports

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

2023-05-12 Thread Steven Loomis
On Thu, 11 May 2023 20:51:37 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

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

2023-05-12 Thread Naoto Sato
On Thu, 11 May 2023 20:39:57 GMT, Justin Lu wrote: >> 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:

Re: RFR: 8291966: SwitchBootstrap.typeSwitch could be faster [v2]

2023-05-12 Thread Adam Sotona
On Tue, 17 Jan 2023 15:55:40 GMT, Jan Lahoda wrote: >> The pattern matching switches are using a bootstrap method >> `SwitchBootstrap.typeSwitch` to implement the jumps in the switch. >> Basically, for a switch like: >> >> switch (obj) { >> case String s when s.isEmpty() -> {} >> case

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

2023-05-12 Thread Naoto Sato
On Fri, 12 May 2023 08:45:37 GMT, Alan Bateman wrote: > I'm just wondering where a developer might go to get a definitive list, i.e. > aside from this API note, how would they know that "-trad" or "-traditional" > can be used to configure the ordering. Locale.forLanguageTag supports more >

RFR: 8308016: Use snippets in java.io package

2023-05-12 Thread Brian Burkhalter
Replace `{@code ...}` patterns and the like with `{@snippet lang=java : ...>`. - Commit messages: - 8308016: Use snippets in java.io package Changes: https://git.openjdk.org/jdk/pull/13957/files Webrev: https://webrevs.openjdk.org/?repo=jdk=13957=00 Issue:

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

2023-05-12 Thread Maurizio Cimadamore
On Thu, 11 May 2023 10:00:39 GMT, Maurizio Cimadamore wrote: > 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 >

RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it

2023-05-12 Thread Volker Simonis
Since JDK13, executing commands in a sub-process defaults to the so called `POSIX_SPAWN` launching mechanism (i.e. `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by using `posix_spawn(3)` to firstly start a tiny helper program called `jspawnhelper` in a subprocess. In a

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

2023-05-12 Thread Daniel Fuchs
On Fri, 5 May 2023 13:43:43 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

Re: RFR: 8306842: Classfile API performance improvements [v4]

2023-05-12 Thread Chen Liang
On Wed, 10 May 2023 10:00:47 GMT, Adam Sotona wrote: >> Following improvements implemented: >> - Switch over `String` replaced with switch single char >> - Binary search for frames in `StackMapGenerator` >> - `StackMapGenerator.rawHandlers` with pre-calculated offsets >> - `ClassEntry` is

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

2023-05-12 Thread Jorn Vernee
On Thu, 11 May 2023 10:00:39 GMT, Maurizio Cimadamore wrote: > 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 >

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

2023-05-12 Thread Jaikiran Pai
On Thu, 11 May 2023 18:34:45 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

RFR: 8307403: java/util/zip/DeInflate.java timed out

2023-05-12 Thread Jaikiran Pai
Can I please get a review of this test only change which addresses the issue noted in https://bugs.openjdk.org/browse/JDK-8307403? When we recently did a change in https://bugs.openjdk.org/browse/JDK-8299748, there was a oversight that the `deflate.deflate(tempBuffer)` could potentially end up

RFR: 8287834: Add SymbolLookup::or method

2023-05-12 Thread Maurizio Cimadamore
This patch adds a simpler method for composing symbol lookups. It is common for clients to chain multiple symbol lookups together, e.g. to find a symbol in multiple libraries. A new instance method, namely `SymbolLookup::or` is added, which first searches a symbol in the first lookup, and, if

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

2023-05-12 Thread Maurizio Cimadamore
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: 8307547: Support variant collations [v4]

2023-05-12 Thread Alan Bateman
On Thu, 11 May 2023 20:51:37 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