Re: RFR: 8367005: ImageReader refactor caused performance regressions for startup and footprint [v6]

2025-09-11 Thread David Beaumont
> Summary: Add two new methods to ImageReader to make SystemModuleReader more > performant. > > Analysis of benchmarks shows that when the vast majority of resources > (~11,000 in the Perfstartup-SwingSet-G1 benchmark) tested for in > SystemModuleReader do NOT exist, performance is degraded com

Integrated: 8366733: Re-examine older java.text NF, DF, and DFS serialization tests

2025-09-11 Thread Justin Lu
On Thu, 4 Sep 2025 22:03:51 GMT, Justin Lu wrote: > This PR cleans up the existing DecimalFormatSymbols, DecimalFormat, and > NumberFormat serialization tests. > > As mentioned in https://github.com/openjdk/jdk/pull/27008 these tests can be > re-visited. > > These older tests are either not r

Re: RFR: 8366837: Clean up gensrc by spp.Spp

2025-09-11 Thread Chen Liang
On Wed, 3 Sep 2025 20:17:50 GMT, Magnus Ihse Bursie wrote: > Several java classes in java.base is generated from templates using SPP, the > "Stream Preprocessor". Unfortunately much of this code is very old and has > survived unchanged since pre-JDK 7. It does not follow modern makefile > stan

Re: RFR: 8357708: com.sun.jndi.ldap.Connection ignores queued LDAP replies if Connection is subsequently closed [v4]

2025-09-11 Thread Jaikiran Pai
On Wed, 10 Sep 2025 15:18:25 GMT, Daniel Fuchs wrote: >> Jaikiran Pai has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains six additional >> commits

Re: RFR: 8350550: Preload classes from AOT cache during VM bootstrap [v7]

2025-09-11 Thread Ioi Lam
On Tue, 9 Sep 2025 16:46:13 GMT, Ashutosh Mehra wrote: >> Ioi Lam has updated the pull request with a new target base due to a merge >> or a rebase. The pull request now contains 22 commits: >> >> - @ashu-mehra review comments >> - Merge branch 'master' into 8350550-preload-aot-classes-during

Re: RFR: 8357708: com.sun.jndi.ldap.Connection ignores queued LDAP replies if Connection is subsequently closed [v5]

2025-09-11 Thread Jaikiran Pai
> Can I please get a review of this change which proposes to address the issue > noted in https://bugs.openjdk.org/browse/JDK-8357708? > > As noted in the issue, the current code in > `com.sun.jndi.ldap.Connection.readReply()` is susceptible to throwing a > `ServiceUnavailableException` even wh

Re: RFR: 8366837: Clean up gensrc by spp.Spp

2025-09-11 Thread Alan Bateman
On Mon, 8 Sep 2025 18:06:54 GMT, Chen Liang wrote: > This patch removed the `VARHANDLES_GENSRC_DIR` variable used by > VarHandleGuards generation. I think it can be addressed by a hot fix. I think the change needs to backed out and the differences with line numbers checked to see what impact i

Re: RFR: 8365483: Test sun/rmi/runtime/Log/6409194/NoConsoleOutput.java sometimes fails [v3]

2025-09-11 Thread Daniel Fuchs
On Tue, 9 Sep 2025 15:31:40 GMT, David Beaumont wrote: >> The writer field of the handler needs to be re-checked for null inside the >> locked region before use. > > David Beaumont has updated the pull request incrementally with one additional > commit since the last revision: > > License fi

Re: RFR: 8367365: java/math/BigInteger/BigIntegerTest.java failed in jtreg timeout

2025-09-11 Thread Raffaello Giulietti
On Thu, 11 Sep 2025 09:27:06 GMT, Alan Bateman wrote: >> This PR >> * Moves sqrt() and nthRoot() tests to a new subset. >> * Removes a leftover `@run` tag without a timeout. >> * Increases the explicit timeout from 400 to 480. >> * Sorts the jtreg tags according to standard conventions. > > test/

Re: RFR: 8367138: JNI exception pending in os_getCmdlineAndUserInfo of ProcessHandleImpl_macosx.c

2025-09-11 Thread Brian Burkhalter
On Wed, 10 Sep 2025 21:03:32 GMT, Roger Riggs wrote: > JNI exception pending in os_getCmdlineAndUserInfo of > ProcessHandleImpl_macosx.c:306 > Minor cleanup of a missing check for exception pending. Looks all right. - Marked as reviewed by bpb (Reviewer). PR Review: https://git.o

Re: RFR: 8367324: Avoid redundant parsing when formatting with DigitList

2025-09-11 Thread Justin Lu
On Fri, 5 Sep 2025 14:18:19 GMT, Johannes Graham wrote: > When formatting doubles or BigDecimals, DigitList first formats them as a > string and then parses the resultant string to extract the mantissa and the > exponent. This can be done more directly. This allows removing some parsing > code

Re: [External] : Re: Excessive copying of Collection.toArray()

2025-09-11 Thread Stuart Marks
(This deserves a reply, but I've been distracted by a bunch of other stuff recently. I should be able to continue this conversation in a few days. Sorry for the delay.) s'marks

Re: RFR: 8367005: ImageReader refactor caused performance regressions for startup and footprint [v5]

2025-09-11 Thread David Beaumont
> Summary: Add two new methods to ImageReader to make SystemModuleReader more > performant. > > Analysis of benchmarks shows that when the vast majority of resources > (~11,000 in the Perfstartup-SwingSet-G1 benchmark) tested for in > SystemModuleReader do NOT exist, performance is degraded com

Can we deprecate Path.endsWith(String)?

2025-09-11 Thread David Alayachew
Hello @core-libs-dev , I have frequently run into the following pothole. Imagine the following directory setup. root/folderA/fileX.java root/folderB/fileY.js root/folderC/fileZ.html In this directory, let's say that we run the following code. Files .walk(Path.of("root")) .filter(path -> path.e

Re: RFR: 8357708: com.sun.jndi.ldap.Connection ignores queued LDAP replies if Connection is subsequently closed [v4]

2025-09-11 Thread Jaikiran Pai
> Can I please get a review of this change which proposes to address the issue > noted in https://bugs.openjdk.org/browse/JDK-8357708? > > As noted in the issue, the current code in > `com.sun.jndi.ldap.Connection.readReply()` is susceptible to throwing a > `ServiceUnavailableException` even wh

Re: RFR: 8367365: java/math/BigInteger/BigIntegerTest.java failed in jtreg timeout

2025-09-11 Thread Jaikiran Pai
On Thu, 11 Sep 2025 08:55:02 GMT, Raffaello Giulietti wrote: > This PR > * Moves sqrt() and nthRoot() tests to a new subset. > * Removes a leftover `@run` tag without a timeout. > * Increases the explicit timeout from 400 to 480. > * Sorts the jtreg tags according to standard conventions. The r

RFR: 8367382: Expand use of representation equivalence terminology

2025-09-11 Thread Joe Darcy
Small doc enhancement to use the term "representation equivalence" in a few more locations. - Commit messages: - JDK-8367382: Expand use of representation equivalence terminology Changes: https://git.openjdk.org/jdk/pull/27232/files Webrev: https://webrevs.openjdk.org/?repo=jdk&p

Re: RFR: 8367324: Avoid redundant parsing when formatting with DigitList

2025-09-11 Thread Raffaello Giulietti
On Fri, 5 Sep 2025 14:37:01 GMT, Johannes Graham wrote: >> When formatting doubles or BigDecimals, DigitList first formats them as a >> string and then parses the resultant string to extract the mantissa and the >> exponent. This can be done more directly. This allows removing some parsing >>

Re: RFR: 8367005: ImageReader refactor caused performance regressions for startup and footprint [v3]

2025-09-11 Thread David Beaumont
On Thu, 11 Sep 2025 10:43:55 GMT, David Beaumont wrote: >> Summary: Add two new methods to ImageReader to make SystemModuleReader more >> performant. >> >> Analysis of benchmarks shows that when the vast majority of resources >> (~11,000 in the Perfstartup-SwingSet-G1 benchmark) tested for in

Re: RFR: 8346719: Add relaunchers to the static JDK image for missing executables

2025-09-11 Thread Magnus Ihse Bursie
On Thu, 11 Sep 2025 00:39:43 GMT, Jiangli Zhou wrote: >> @AlanBateman @jianglizhou Now that Erik has approved the build >> functionality, I'd appreciate if anyone of you could approve as well, then I >> can finally integrate this. > >> @magicus I'll take a look today. > > Hi @magicus I looked

Re: RFR: 8365483: Test sun/rmi/runtime/Log/6409194/NoConsoleOutput.java sometimes fails [v4]

2025-09-11 Thread duke
On Tue, 9 Sep 2025 19:19:22 GMT, David Beaumont wrote: >> The writer field of the handler needs to be re-checked for null inside the >> locked region before use. > > David Beaumont has updated the pull request with a new target base due to a > merge or a rebase. The incremental webrev excludes

Re: RFR: 8346719: Add relaunchers to the static JDK image for missing executables

2025-09-11 Thread Jiangli Zhou
On Thu, 11 Sep 2025 00:39:43 GMT, Jiangli Zhou wrote: >> @AlanBateman @jianglizhou Now that Erik has approved the build >> functionality, I'd appreciate if anyone of you could approve as well, then I >> can finally integrate this. > >> @magicus I'll take a look today. > > Hi @magicus I looked

Re: RFR: 8367382: Expand use of representation equivalence terminology [v2]

2025-09-11 Thread Joe Darcy
On Thu, 11 Sep 2025 19:10:57 GMT, Eirik Bjørsnøs wrote: >> Joe Darcy has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix typo found in code review. > > src/java.base/share/classes/java/lang/Record.java line 132: > >> 130: * Note th

Re: RFR: 8367382: Expand use of representation equivalence terminology [v2]

2025-09-11 Thread Joe Darcy
> Small doc enhancement to use the term "representation equivalence" in a few > more locations. Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: Fix typo found in code review. - Changes: - all: https://git.openjdk.org/jdk

Re: RFR: 8367237: Thread-Safety Usage Warning for java.text.Collator Classes [v3]

2025-09-11 Thread Naoto Sato
On Thu, 11 Sep 2025 22:36:28 GMT, Justin Lu wrote: >> Please review this PR which is a documentation change to make apparent the >> recommended approach for using Collator & RuleBasedCollator in a multi >> threaded environment via an implNote. The original issue and CSR have >> additional cont

Re: RFR: 8328874: Class::forName0 should validate the class name length early [v12]

2025-09-11 Thread Guanqiang Han
On Wed, 3 Sep 2025 18:40:26 GMT, Roger Riggs wrote: >> Guanqiang Han has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update Class.java >> >> change overflow check > >> /reviewers 2 reviewer >> >> I recommend putting this PR on hold

Re: RFR: 8367237: Thread-Safety Usage Warning for java.text.Collator Classes [v2]

2025-09-11 Thread Iris Clark
On Thu, 11 Sep 2025 21:34:24 GMT, Justin Lu wrote: >> Please review this PR which is a documentation change to make apparent the >> recommended approach for using Collator & RuleBasedCollator in a multi >> threaded environment via an implNote. The original issue and CSR have >> additional cont

Re: RFR: 8367237: Thread-Safety Usage Warning for java.text.Collator Classes [v3]

2025-09-11 Thread Justin Lu
> Please review this PR which is a documentation change to make apparent the > recommended approach for using Collator & RuleBasedCollator in a multi > threaded environment via an implNote. The original issue and CSR have > additional context. Justin Lu has updated the pull request incrementall

Re: RFR: 8367237: Thread-Safety Usage Warning for java.text.Collator Classes [v2]

2025-09-11 Thread Justin Lu
> Please review this PR which is a documentation change to make apparent the > recommended approach for using Collator & RuleBasedCollator in a multi > threaded environment via an implNote. The original issue and CSR have > additional context. Justin Lu has updated the pull request incrementall

Re: RFR: 8367237: Thread-Safety Usage Warning for java.text.Collator Classes [v2]

2025-09-11 Thread Justin Lu
On Thu, 11 Sep 2025 20:14:56 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Doc updates reflecting Naoto's comments > > src/java.base/share/classes/java/text/Collator.java line 117: > >> 115: * >> 1

Re: RFR: 8367237: Thread-Safety Usage Warning for java.text.Collator Classes

2025-09-11 Thread Naoto Sato
On Thu, 11 Sep 2025 18:58:46 GMT, Justin Lu wrote: > Please review this PR which is a documentation change to make apparent the > recommended approach for using Collator & RuleBasedCollator in a multi > threaded environment via an implNote. The original issue and CSR have > additional context.

RFR: 8367365: java/math/BigInteger/BigIntegerTest.java failed in jtreg timeout

2025-09-11 Thread Raffaello Giulietti
This PR * Moves sqrt() and nthRoot() tests to a new subset. * Removes a leftover `@run` tag without a timeout. * Increases the explicit timeout from 400 to 480. * Sorts the jtreg tags according to standard conventions. - Commit messages: - 8367365: java/math/BigInteger/BigIntegerTest

Re: RFR: 8367365: java/math/BigInteger/BigIntegerTest.java failed in jtreg timeout

2025-09-11 Thread Alan Bateman
On Thu, 11 Sep 2025 08:55:02 GMT, Raffaello Giulietti wrote: > This PR > * Moves sqrt() and nthRoot() tests to a new subset. > * Removes a leftover `@run` tag without a timeout. > * Increases the explicit timeout from 400 to 480. > * Sorts the jtreg tags according to standard conventions. test/

Re: RFR: 8367005: ImageReader refactor caused performance regressions for startup and footprint [v2]

2025-09-11 Thread David Beaumont
On Thu, 11 Sep 2025 11:59:26 GMT, Claes Redestad wrote: >> I think replacing `startsWith(String)` with `indexOf(char)` is dubious, >> since the latter is O(n) and the former O(1) >> >> If you _really_ need to squeeze out everything on startup then `(x.length() >> > 0 && x.charAt(0) == '/')` i

Re: RFR: 8328874: Class::forName0 should validate the class name length early [v16]

2025-09-11 Thread duke
On Tue, 9 Sep 2025 01:05:37 GMT, Guanqiang Han wrote: >> Validate class name length immediately after GetStringUTFLength() in >> Class.forName0. This prevents potential issues caused by overly long class >> names before they reach later code that would reject them, throwing >> ClassNotFoundExc

Re: RFR: 8328874: Class::forName0 should validate the class name length early [v16]

2025-09-11 Thread Roger Riggs
On Tue, 9 Sep 2025 01:05:37 GMT, Guanqiang Han wrote: >> Validate class name length immediately after GetStringUTFLength() in >> Class.forName0. This prevents potential issues caused by overly long class >> names before they reach later code that would reject them, throwing >> ClassNotFoundExc

Integrated: 8367365: java/math/BigInteger/BigIntegerTest.java failed in jtreg timeout

2025-09-11 Thread Raffaello Giulietti
On Thu, 11 Sep 2025 08:55:02 GMT, Raffaello Giulietti wrote: > This PR > * Moves sqrt() and nthRoot() tests to a new subset. > * Removes a leftover `@run` tag without a timeout. > * Increases the explicit timeout from 400 to 480. > * Sorts the jtreg tags according to standard conventions. This

Re: RFR: 8367324: Avoid redundant parsing when formatting with DigitList [v2]

2025-09-11 Thread Johannes Graham
On Wed, 10 Sep 2025 23:47:47 GMT, Johannes Graham wrote: >> When formatting doubles or BigDecimals, DigitList first formats them as a >> string and then parses the resultant string to extract the mantissa and the >> exponent. This can be done more directly. This allows removing some parsing >>

Re: RFR: 8334015: Add Support for UUID Version 7 (UUIDv7) defined in RFC 9562 [v13]

2025-09-11 Thread Roger Riggs
On Wed, 10 Sep 2025 19:57:56 GMT, Kieran Farrell wrote: >> test/jdk/java/util/UUID/UUIDTest.java line 52: >> >>> 50: unixEpochTimeMillisTest(); >>> 51: unixEpochTimeMillisTest_Multi(); >>> 52: unixEpochTimeMillis_userInputTest(); >> >> Also rename the tests to use the `e

Integrated: 8367138: JNI exception pending in os_getCmdlineAndUserInfo of ProcessHandleImpl_macosx.c

2025-09-11 Thread Roger Riggs
On Wed, 10 Sep 2025 21:03:32 GMT, Roger Riggs wrote: > JNI exception pending in os_getCmdlineAndUserInfo of > ProcessHandleImpl_macosx.c:306 > Minor cleanup of a missing check for exception pending. This pull request has now been integrated. Changeset: 56f2f7a3 Author:Roger Riggs URL:

Re: RFR: 8367365: java/math/BigInteger/BigIntegerTest.java failed in jtreg timeout

2025-09-11 Thread Raffaello Giulietti
On Thu, 11 Sep 2025 12:56:33 GMT, Jaikiran Pai wrote: >> Yes - the observed timeout was 120s - so it must have been the first `@run`. >> That first `@run` was added by >> [JDK-8078672](https://bugs.openjdk.org/browse/JDK-8078672) - I'm not sure >> why - that might have been a left over from d

Re: RFR: 8360046: Scalability issue when submitting virtual threads with almost empty tasks [v8]

2025-09-11 Thread Viktor Klang
On Sun, 7 Sep 2025 18:28:54 GMT, Doug Lea wrote: >> This set of updates reduces contention-based performance loss under heavy >> over-subscription, while also improving perfomance more generally. > > Doug Lea has updated the pull request incrementally with one additional > commit since the last

Re: RFR: 8346719: Add relaunchers to the static JDK image for missing executables [v9]

2025-09-11 Thread Magnus Ihse Bursie
> In the static JDK image, a single humongous java executable is generated, and > no other launcher, such as javac. This makes it impossible to run our jtreg > tests, which assume these are present. > > The solution is fortunately simply: we just need to add a bunch of trivial > launchers, whic

Re: RFR: 8367005: ImageReader refactor caused performance regressions for startup and footprint [v2]

2025-09-11 Thread David Beaumont
On Thu, 11 Sep 2025 09:56:30 GMT, David Beaumont wrote: >> If something shouldn't happen, I would prefer an explicit exception or at >> least an assert. > > Not 100% sure it's impossible to tickle this with current callers (e.g. > "jrt:/module//path" leaving the trailing path starting with a '/

Re: RFR: 8367005: ImageReader refactor caused performance regressions for startup and footprint [v2]

2025-09-11 Thread Claes Redestad
On Thu, 11 Sep 2025 11:56:30 GMT, Claes Redestad wrote: >> I had thought of these micro optimizations, but I thought we preferred >> clarity unless performance was proven to be an issue. I see >> contains("") in other code - should we be changing that? > > I think replacing `starts

Re: RFR: 8367138: JNI exception pending in os_getCmdlineAndUserInfo of ProcessHandleImpl_macosx.c

2025-09-11 Thread Lance Andersen
On Wed, 10 Sep 2025 21:03:32 GMT, Roger Riggs wrote: > JNI exception pending in os_getCmdlineAndUserInfo of > ProcessHandleImpl_macosx.c:306 > Minor cleanup of a missing check for exception pending. Marked as reviewed by lancea (Reviewer). - PR Review: https://git.openjdk.org/jdk/

Re: RFR: 8366495: Incorrect minimum memory size allocated in allocateNativeInternal() [v2]

2025-09-11 Thread Amit Kumar
On Tue, 2 Sep 2025 09:43:23 GMT, Amit Kumar wrote: >> Originally Reported in OpenJ9, fix by @AditiS11 present here: >> https://github.com/ibmruntimes/openj9-openjdk-jdk25/pull/32 >> >> These test failure were reported in OpenJ9 (x86), I can't reproduce on my >> system (s390x): >> >> java/for

Re: RFR: 8346719: Add relaunchers to the static JDK image for missing executables [v8]

2025-09-11 Thread Magnus Ihse Bursie
> In the static JDK image, a single humongous java executable is generated, and > no other launcher, such as javac. This makes it impossible to run our jtreg > tests, which assume these are present. > > The solution is fortunately simply: we just need to add a bunch of trivial > launchers, whic

Re: RFR: 8367005: ImageReader refactor caused performance regressions for startup and footprint [v2]

2025-09-11 Thread David Beaumont
On Thu, 11 Sep 2025 01:19:17 GMT, Roger Riggs wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Found additional place where new API can be used. > > src/java.base/share/classes/jdk/internal/jimage/ImageReader.java

Re: RFR: 8367005: ImageReader refactor caused performance regressions for startup and footprint [v2]

2025-09-11 Thread David Beaumont
On Thu, 11 Sep 2025 03:12:33 GMT, Chen Liang wrote: >> While you are at it, both findNode and BuildModulesNode should have comments >> indicating that the node can be found in one of two places. > > If something shouldn't happen, I would prefer an explicit exception or at > least an assert. No

Re: RFR: 8346719: Add relaunchers to the static JDK image for missing executables [v6]

2025-09-11 Thread Magnus Ihse Bursie
On Thu, 11 Sep 2025 09:27:51 GMT, Magnus Ihse Bursie wrote: >> src/java.base/windows/native/launcher/relauncher.c line 1: >> >>> 1: /* >> >> How did you test the relauncher for Windows? Can you remind me if static JDK >> is support for Windows? > > Yes, static JDK is supported on all supported

Re: RFR: 8346719: Add relaunchers to the static JDK image for missing executables [v6]

2025-09-11 Thread Magnus Ihse Bursie
On Wed, 10 Sep 2025 23:36:08 GMT, Jiangli Zhou wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update based on review > > src/java.base/share/native/launcher/main.c line 44: > >> 42: >> 43: // This is used

Re: RFR: 8346719: Add relaunchers to the static JDK image for missing executables [v6]

2025-09-11 Thread Magnus Ihse Bursie
On Wed, 10 Sep 2025 23:29:03 GMT, Jiangli Zhou wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update based on review > > src/java.base/share/native/launcher/main.c line 41: > >> 39: >> 40: // This is repor

Re: RFR: 8342382: Implement JEP 522: G1 GC: Improve Throughput by Reducing Synchronization [v59]

2025-09-11 Thread Thomas Schatzl
On Wed, 10 Sep 2025 15:28:39 GMT, Thomas Schatzl wrote: >> Hi all, >> >> please review this change that implements (currently Draft) JEP: G1: >> Improve Application Throughput with a More Efficient Write-Barrier. >> >> The reason for posting this early is that this is a large change, and the