Re: RFR: 8353185: Introduce the concept of upgradeable files in context of JEP 493

2025-04-05 Thread Severin Gehwolf
On Thu, 3 Apr 2025 06:31:20 GMT, Alan Bateman wrote: > What about changes to conf files, especially Java.security (for hardening TLS > settings) - or at least pointing to a include? You can still do that after creating the custom runtime as you do today when linking using JMODs. The point of t

Re: RFR: 8352935: Launcher should not add $JDK/../lib to LD_LIBRARY_PATH [v2]

2025-04-05 Thread Joachim Kern
> In the JDK launcher, there is a codepath which would set/modify the > LD_LIBRARY_PATH. This happens unconditionally on AIX and Linux/musl and can > also happen on other Linux platforms if an LD_LIBRARY_PATH is pre-set which > contains a libjvm.so. > > The LD_LIBRARY_PATH is set to $JVMPATH:$J

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v27]

2025-04-05 Thread Maurizio Cimadamore
On Thu, 3 Apr 2025 11:23:36 GMT, Per Minborg wrote: >> Yes - but they cache different things -- the first caches results for values >> 0-9 -- the second cached results for 1, 2, 4, 8, 16, 32. > > That was intentional as the list is always `0..size` whereas a map can use > arbitrary inputs. Is t

Re: RFR: 8352565: Add native method implementation of Reference.get() [v2]

2025-04-05 Thread Kim Barrett
On Tue, 1 Apr 2025 22:01:55 GMT, Brent Christian wrote: >> Kim Barrett has updated the pull request incrementally with one additional >> commit since the last revision: >> >> parameterized return type of native get0 > > test/hotspot/jtreg/gc/TestNativeReferenceGet.java line 162: > >> 160:

Re: RFR: 8353118: Deprecate the use of `java.locale.useOldISOCodes` system property

2025-04-05 Thread Justin Lu
On Fri, 28 Mar 2025 20:17:30 GMT, Naoto Sato wrote: > Proposing to remove the `java.locale.useOldISOCodes` system property. This > property is for backward compatibility introduced back in JDK17 and I believe > it is now fine to remove it. In this PR targeting JDK25, it emits a > deprecate-for

RFR: 8353267: jmod create finds the wrong set of packages when class file are in non-package location

2025-04-05 Thread Alan Bateman
`jmod create` maps the contents of the module to a set of packages. This mapping derives illegal package names when class resources are located in non-package locations, e.g. in the META-INF tree. `jlink` also has an issue in this area and doesn't correctly determine if a resource is in a named

Re: RFR: 8352709: Remove bad timing annotations from WhileOpTest.java

2025-04-05 Thread Jaikiran Pai
On Mon, 24 Mar 2025 12:17:22 GMT, Leo Korinth wrote: > WhileOpTest.java is a TestNG test (`TestNG.dirs` is set in Find file: > `test/jdk/java/util/stream/test/TEST.properties`) > > As such, the `@run main/timeout=240` annotation is ignored. If that was not > the case, it would complain about n

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v13]

2025-04-05 Thread David Beaumont
> 8349206: j.u.l.Handler classes create deadlock risk via synchronized > publish() method. > > 1. Remove synchronization of calls to publish() in Handlers in > java.util.logging package. > 2. Add explanatory comments to various affected methods. > 3. Add a test to ensure deadlocks no longer occu

Integrated: 8353684: [BACKOUT] j.u.l.Handler classes create deadlock risk via synchronized publish() method

2025-04-05 Thread Stuart Marks
On Thu, 3 Apr 2025 21:03:08 GMT, Stuart Marks wrote: > Back out commit for > [JDK-8349206](https://bugs.openjdk.org/browse/JDK-8349206) because of build > failure. > > This reverts commit ebcb9a8b128cc6411610566c8368db63d25a5127. This pull request has now been integrated. Changeset: 57df89c4

Re: RFR: 8304674: AttachCurrentThread 's argument is JavaVMAttachArgs

2025-04-05 Thread Jaikiran Pai
On Mon, 31 Mar 2025 01:28:47 GMT, tison wrote: >> Try to add clear type annotations. >> >> Please let me know how this patch can be properly reviewed >_< > > retest? Hello @tisonkun, is there an issue created for this? https://bugs.openjdk.org/browse/JDK-8304674 against which this PR is linked

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v40]

2025-04-05 Thread Maurizio Cimadamore
On Thu, 3 Apr 2025 14:00:00 GMT, Per Minborg wrote: >> Implement JEP 502. >> >> The PR passes tier1-tier3 tests. > > Per Minborg has updated the pull request incrementally with one additional > commit since the last revision: > > Make the sqrt example different src/java.base/share/classes/j

Re: RFR: 8344708: Compiler Implementation of Module Import Declarations [v4]

2025-04-05 Thread Jan Lahoda
> This is a patch to finalize the module imports feature. Please see: > https://bugs.openjdk.org/browse/JDK-8344700 Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: Reflecting review feedback - avoiding hardcoded constants.

Re: RFR: 8353185: Introduce the concept of upgradeable files in context of JEP 493

2025-04-05 Thread Bernd
On Wed, 2 Apr 2025 18:39:57 GMT, Severin Gehwolf wrote: > For JEP 493-enabled builds there are no JMODs. Certain files come from the > installed JDK image when a user creates a custom run-time from it. This is > problematic for example for files that often come from a different package > (e.g.

Re: RFR: 8352064: AIX: now also able to build static-jdk image with a statically linked launcher [v3]

2025-04-05 Thread Joachim Kern
On Fri, 21 Mar 2025 10:33:10 GMT, Magnus Ihse Bursie wrote: >> Joachim Kern has updated the pull request incrementally with one additional >> commit since the last revision: >> >> added needed include > > make/StaticLibs.gmk line 117: > >> 115: OUTPUT_FILE := $(lib).exp, \ >> 116:

Re: RFR: 8352971: Increase maximum number of hold counts for ReentrantReadWriteLock

2025-04-05 Thread Alan Bateman
On Thu, 27 Mar 2025 11:30:11 GMT, Alan Bateman wrote: >> I'm breaking this change out as a separate improvement, since it will not be >> generally possible to adjust these limits on the j.u.c primitives since they >> might already use a backing `long` to pack in information which needs to be >

Re: RFR: 8352016: Improve java/lang/RuntimeTests/RuntimeExitLogTest.java [v2]

2025-04-05 Thread KIRIYAMA Takuya
On Wed, 19 Mar 2025 20:09:51 GMT, Roger Riggs wrote: >> KIRIYAMA Takuya has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8352016: Improve java/lang/RuntimeTests/RuntimeExitLogTest.java > > test/jdk/java/lang/RuntimeTests/ExitLogging-FINER

Re: RFR: 8352289: [macos] Review skipped tests in tools/jpackage/macosx/SigningPackage*

2025-04-05 Thread Alexander Matveev
On Mon, 24 Mar 2025 14:35:50 GMT, Alexey Semenyuk wrote: > Follow-up for https://github.com/openjdk/jdk/pull/24087 PR. > Revamp signing tests: > - Run the tests only if `jpackage.test.MacSignTests` property is set to > "run". This property also can be set to "setup" and "teardown" to set up an

Re: RFR: 8352176: Automate setting up environment for mac signing tests [v3]

2025-04-05 Thread Alexey Semenyuk
> Automate setting up an environment for mac signing tests: create keychain(s), > self-signing certificates, and register them in the system. > > To set up the environment, run `make test-only > TEST=test/jdk/tools/jpackage/macosx/base/SigningBase.java > JTREG=JAVA_OPTIONS=-Djpackage.test.SignE

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v25]

2025-04-05 Thread Maurizio Cimadamore
On Tue, 1 Apr 2025 13:27:34 GMT, Per Minborg wrote: >> Implement JEP 502. >> >> The PR passes tier1-tier3 tests. > > Per Minborg has updated the pull request incrementally with two additional > commits since the last revision: > > - Add lazy toSting for StableMap::values > - Make toString fo

Re: RFR: 8352935: Launcher should not add $JDK/../lib to LD_LIBRARY_PATH [v2]

2025-04-05 Thread Jaikiran Pai
On Thu, 3 Apr 2025 12:57:40 GMT, Jaikiran Pai wrote: > Please give me a day or so to run this change against our CI. tier1, tier2 and tier3 testing of this change went fine in our CI. - PR Comment: https://git.openjdk.org/jdk/pull/24351#issuecomment-2777338708

Re: RFR: 8353331: Test ForkJoinPool20Test::testFixedDelaySequence is failing

2025-04-05 Thread Doug Lea
On Tue, 1 Apr 2025 10:56:25 GMT, Alan Bateman wrote: > ForkJoinPool20Test::testFixedDelaySequence is failing intermittently. The > assert that checks that the periodically tasks only executes 8 times is > removed, it may run more than this before it cancelled. Yes, the bound is no longer guara

RE: JDK-8352891 Performance improvements to ByteArrayOutputStream

2025-04-05 Thread Engebretson, John
I certainly see the value in the unsynchronized variant and am happy to do that – but that isn’t sufficient to address the original problem of scaling the array. MemoryOutputStream results in 3x improvement and eliminates the hard 2GB cap, and can replace custom logic in Tomcat, Spring, etc.

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v26]

2025-04-05 Thread Per Minborg
> Implement JEP 502. > > The PR passes tier1-tier3 tests. Per Minborg has updated the pull request incrementally with three additional commits since the last revision: - Use static final SV in the snippets - Update StableValue main description - Add stable collections to MOAT tests

Re: RFR: 8352565: Add native method implementation of Reference.get()

2025-04-05 Thread Chen Liang
On Sat, 29 Mar 2025 21:47:18 GMT, Kim Barrett wrote: > Please review this change which adds a native method providing the > implementation of Reference::get. Referece::get is an intrinsic candidate, so > this native method implementation is only used when the intrinsic is not. > > Currently the

Re: RFR: 8342382: Implementation of JEP G1: Improve Application Throughput with a More Efficient Write-Barrier [v29]

2025-04-05 Thread Thomas Schatzl
> 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 JEP > process is already taking very long with no end in sight

Re: RFR: 8352064: AIX: now also able to build static-jdk image with a statically linked launcher

2025-04-05 Thread Joachim Kern
On Mon, 17 Mar 2025 15:01:10 GMT, Joachim Kern wrote: >> Looks like this variable is misspelled (missing "S"). >> >> DEPS := $(STATIC_LIB_FILE), \ >> >> Also note that by default log level INFO is not printed. You would need to >> run the build with `make LOG=info` to see the message. > > Ups,

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v28]

2025-04-05 Thread Per Minborg
> Implement JEP 502. > > The PR passes tier1-tier3 tests. Per Minborg has updated the pull request incrementally with three additional commits since the last revision: - Add a dependency layout image snippet - Wip on condy - Use @enablePreview in MOAT - Changes: - all: https:

Re: RFR: 8351593: [JMH] test PhoneCode.Bulk reports NPE exception

2025-04-05 Thread Claes Redestad
On Wed, 12 Mar 2025 15:53:33 GMT, Vladimir Ivanov wrote: > the test output was cleanup for common execution. I would argue against that. While tests and test resources already comprise ~360M it could be argued that adding this 3.5M dictionary file wouldn't hurt all that much -- but OTOH this

Re: RFR: 8304674: File java.c compile error with -fsanitize=address -O0 [v2]

2025-04-05 Thread SendaoYan
> Hi all, > File src/java.base/share/native/libjli/java.c compile error: control reaches > end of non-void function [-Werror=return-type] with gcc options > -fsanitize=address -O0. The function int JavaMain(void* _args) in this file > will execute return ret in LEAVE() macro, but gcc with -O0 is

Re: Reg: Proposal: Generalized Number.parseNumber(String) Method for Java

2025-04-05 Thread Joseph D. Darcy
Another reaction: in practice there is not much numeric about java.lang.Number. Operationally the type means "convertible to a primitive type" and there is nothing else extending Number lets you do with a class. Additionally in retrospect, Number would have been better as an interface rather th

Re: RFR: 8352689: Allow for hash sum overrides when linking from the run-time image [v2]

2025-04-05 Thread Severin Gehwolf
On Wed, 26 Mar 2025 10:12:43 GMT, Alan Bateman wrote: > > The cacerts issue mentioned in the JBS issue relates to an RPM installation > > of the JDK where the cacerts file is a symlink to the distro provided one. > > So I think that's "use system" issue. > > TZ updates would potentially break t

Re: RFR: 8352693: Use a simpler console reader instead of JLine for System.console()

2025-04-05 Thread Magnus Ihse Bursie
On Wed, 26 Mar 2025 07:54:48 GMT, Jan Lahoda wrote: > The `java.io.Console` has several backends: a simple on in `java.base`, a > more convenient one in `jdk.internal.le` (with line-reading based on JLine) > and one for JShell. > > The backend based on JLine is proving to be a somewhat problem

Re: RFR: 8352015: LIBVERIFY_OPTIMIZATION remove special optimization settings

2025-04-05 Thread Magnus Ihse Bursie
On Fri, 14 Mar 2025 11:15:26 GMT, Matthias Baesken wrote: > On Linux there are some special settings for LIBVERIFY_OPTIMIZATION that are > most likely not needed any more and could be removed. > The removal (on Linux) brings the lib optimization level de facto from LOW to > HIGH. Marked as rev

Re: RFR: 8326447: jpackage creates Windows installers that cannot be signed [v3]

2025-04-05 Thread Guillaume Toison
On Sat, 29 Mar 2025 23:49:48 GMT, Cormac Redmond wrote: >> Alexey Semenyuk has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Keep bundles produces by the test in the test work directory > > I am seeing this also, after switching from Azul

Re: Reg: Proposal: Generalized Number.parseNumber(String) Method for Java

2025-04-05 Thread Sathish Kumar Thiyagarajan
Thanks, Volkan. I agree that JSON parsers may have their own number codecs and may not necessarily rely on Integer.parseInt() or Long.parseLong(). I appreciate the clarification. Let me simplify my concern: I've tried converting a *String to a Number* and loading it into memory, and my expectati

Withdrawn: 8352107: Allow jtreg test cases to query test VM properties

2025-04-05 Thread Ioi Lam
On Sun, 16 Mar 2025 02:54:36 GMT, Ioi Lam wrote: > This PR tries to cut down the use of `WhiteBox` in the HotSpot test cases. It > modifies `VMProps` to save the set of VM properties into a file called > "vm.properties" under Jtreg's work directory. The new API > `jdk.test.lib.VMPropsGetter` l

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v6]

2025-04-05 Thread Per Minborg
On Mon, 17 Mar 2025 01:58:55 GMT, Luca Kellermann wrote: > > I see that, probably due to prior `java.util` contracts, a stable list or > > map cannot present a `toString` with unset component values. A stable list > > or map uses a “canned” `toString` method that calls `get`, which must force

Re: RFR: 8352565: Add native method implementation of Reference.get() [v3]

2025-04-05 Thread Kim Barrett
> Please review this change which adds a native method providing the > implementation of Reference::get. Referece::get is an intrinsic candidate, so > this native method implementation is only used when the intrinsic is not. > > Currently there is intrinsic support by the interpreter, C1, C2, and

Re: RFR: 8066583: DeflaterInput/OutputStream and InflaterInput/OutputStream should explain responsibility for freeing resources [v6]

2025-04-05 Thread Jaikiran Pai
On Tue, 1 Apr 2025 00:29:47 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/util/zip/InflaterOutputStream.java line 89: >> >>> 87: * @apiNote >>> 88: * The default decompressor will be closed when this output stream >>> 89: * is {@linkplain #close() closed}. >> >> This

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v13]

2025-04-05 Thread duke
On Wed, 2 Apr 2025 21:59:32 GMT, David Beaumont wrote: >> 8349206: j.u.l.Handler classes create deadlock risk via synchronized >> publish() method. >> >> 1. Remove synchronization of calls to publish() in Handlers in >> java.util.logging package. >> 2. Add explanatory comments to various affec

Re: RFR: 8352176: Automate setting up environment for mac signing tests [v6]

2025-04-05 Thread Alexey Semenyuk
> Automate setting up an environment for mac signing tests: create keychain(s), > self-signing certificates, and register them in the system. > > To set up the environment, run `make test-only > TEST=test/jdk/tools/jpackage/macosx/base/SigningBase.java > JTREG=JAVA_OPTIONS=-Djpackage.test.SignE

RFR: 8353585: Provide ChoiceFormat#parse(String, ParsePosition) tests

2025-04-05 Thread Justin Lu
Please review this PR which provides unit tests for `ChoiceFormat#parse(String, ParsePosition)` to check default, multi match, and no match behavior. There were no existing relevant tests. - Commit messages: - more cases + cleanup - init Changes: https://git.openjdk.org/jdk/pull/

Re: RFR: 8304674: File java.c compile error with -fsanitize=address -O0

2025-04-05 Thread SendaoYan
On Mon, 31 Mar 2025 12:57:38 GMT, Magnus Ihse Bursie wrote: > While I normally advocate using DISABLE_WARNING in makefiles instead of > pragmas, in this particular case I wonder if not a pragma in the `LEAVE` > macro would be better? PR has been changed to use `#pragma GCC diagnostic ignored "

Re: RFR: 8352689: Allow for hash sum overrides when linking from the run-time image [v2]

2025-04-05 Thread Severin Gehwolf
On Wed, 26 Mar 2025 17:43:50 GMT, Christoph Langer wrote: > Would it maybe make sense/be possible to offer some re-hash functionality for > using in 2nd step builds? What would that be? Right now linking from the run-time image doesn't allow for `jdk.jlink` to be included, which prevents a 2nd

Re: RFR: 8344708: Compiler Implementation of Module Import Declarations [v2]

2025-04-05 Thread Jan Lahoda
> This is a patch to finalize the module imports feature. Please see: > https://bugs.openjdk.org/browse/JDK-8344700 Jan Lahoda has updated the pull request incrementally with four additional commits since the last revision: - Cleanup, fixing tests. - Adjusting JShell defaults. - Fixing tests.

Re: JDK-8352891 Performance improvements to ByteArrayOutputStream

2025-04-05 Thread Alan Bateman
On 31/03/2025 16:51, Engebretson, John wrote:   Alan – is this what you have in mind: ByteArrayOutputStream.getInstance() // returns existing class ByteArrayOutputStream.getUnsynchronizedInstance() // returns subclass of BAOS that overrides the synchronization ByteArrayOutputStream.getInsta

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v6]

2025-04-05 Thread Per Minborg
On Thu, 13 Mar 2025 15:44:37 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 246 commits: >> >> - Merge branch 'master' into implement-jep502 >> - Clean up exception messages and f

Integrated: 8352276: Skip jtreg tests using native executable with libjvm.so/libjli.so dependencies on static JDK

2025-04-05 Thread Jiangli Zhou
On Tue, 18 Mar 2025 18:57:04 GMT, Jiangli Zhou wrote: > Please review this PR that adds `@requires !jdk.static` to tests, thanks. > > - runtime/StackGap/TestStackGap.java > - runtime/StackGuardPages/TestStackGuardPages.java > - runtime/TLS/TestTLS.java > - runtime/jni/daemonDestroy/TestDaemonDes

Re: RFR: 8352935: Launcher should not add $JDK/../lib to LD_LIBRARY_PATH

2025-04-05 Thread Magnus Ihse Bursie
On Tue, 1 Apr 2025 09:13:45 GMT, Joachim Kern wrote: > In the JDK launcher, there is a codepath which would set/modify the > LD_LIBRARY_PATH. This happens unconditionally on AIX and Linux/musl and can > also happen on other Linux platforms if an LD_LIBRARY_PATH is pre-set which > contains a li

Re: RFR: 8351996: Behavioral updates for ClassValue::remove [v2]

2025-04-05 Thread Jaikiran Pai
On Wed, 19 Mar 2025 21:35:53 GMT, Chen Liang wrote: >> The recent patch #23866 makes calling `ClassValue::remove()` from >> `ClassValue::computeValue()` end up in infinite loops while fixing the stale >> value risk from the method. >> >> The proposed fix is to preserve the stale value risk fix

Re: RFR: 8351933: Inaccurate masking of TC subfield decrement in ForkJoinPool

2025-04-05 Thread Chen Liang
On Thu, 13 Mar 2025 13:34:51 GMT, Dmitry Chuyko wrote: > Please review a tiny fix in the ForkJoinPool. Since JDK 9 (JDK-8134852 [1]) > in one case when TC subfield in ctl field is decremented, the applied masking > (UMASK, upper bits) may not preserve neighbor RC subfield sometimes. In JDKs >

Re: RFR: 8352971: Increase maximum number of hold counts for ReentrantReadWriteLock

2025-04-05 Thread Alan Bateman
On Wed, 26 Mar 2025 16:19:16 GMT, Viktor Klang wrote: > I'm breaking this change out as a separate improvement, since it will not be > generally possible to adjust these limits on the j.u.c primitives since they > might already use a backing `long` to pack in information which needs to be > up

RFR: 8350462: MethodTypeForm.LF_INTERPRET can cache the MemberName instead

2025-04-05 Thread Zihao Lin
Modify the cache in MethodTypeForm that currently stores the LF_INTERPRET Lambda form. Instead of caching the entire LambdaForm, change it to store a SoftReference. This will avoid unnecessary memory usage. - Commit messages: - Merge branch 'openjdk:master' into JDK-8350462 - 8350

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v6]

2025-04-05 Thread Per Minborg
On Sun, 16 Mar 2025 00:34:45 GMT, John R Rose wrote: > Comments on visual noise and side effects in `toString`. > > `renderWrapped` is clever for a single stable value, but it makes for a very > noisy display string, with confusing doubly-nested `[]`, for composite stable > values. I'm talking

Re: RFR: 8352064: AIX: now also able to build static-jdk image with a statically linked launcher [v3]

2025-04-05 Thread Joachim Kern
On Thu, 20 Mar 2025 14:30:58 GMT, Joachim Kern wrote: >> After "JDK-8339480: Build static-jdk image with a statically linked >> launcher" AIX was not able to build the new target. Therefore with >> "JDK-8345590 AIX 'make all' fails after JDK-8339480" the new target was >> disabled again. >> >

Re: RFR: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output" [v4]

2025-04-05 Thread Brent Christian
On Fri, 28 Mar 2025 09:34:58 GMT, Jaikiran Pai wrote: >> Brent Christian has updated the pull request incrementally with one >> additional commit since the last revision: >> >> convert to WeakRefs, use a RefQ, print ForceGC results > > test/jdk/java/lang/ref/FinalizerHistogramTest.java line 1

RFR: 8346948: Update CLDR to Version 47.0

2025-04-05 Thread Naoto Sato
Upgrading the CLDR to version 47.0. A corresponding CSR has also been drafted. - Commit messages: - Updated the CLDR chart - .md files update - TestUnicodeExtension version - LikelySubtagLocalesTest - release-47 - CLDR-17484: English day periods are wrong - release-47-beta2 -

Re: RFR: 8352064: AIX: now also able to build static-jdk image with a statically linked launcher [v3]

2025-04-05 Thread Magnus Ihse Bursie
On Thu, 20 Mar 2025 14:30:58 GMT, Joachim Kern wrote: >> After "JDK-8339480: Build static-jdk image with a statically linked >> launcher" AIX was not able to build the new target. Therefore with >> "JDK-8345590 AIX 'make all' fails after JDK-8339480" the new target was >> disabled again. >> >

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v25]

2025-04-05 Thread Maurizio Cimadamore
On Wed, 2 Apr 2025 11:43:40 GMT, Maurizio Cimadamore wrote: >> I didn't mean to say "this is not true, so use a `static final` instead". >> What I meant was more "let's not dive into VM-specific details now" (see my >> other comment on the topic), and just focus on semantics instead. Then let'

Re: RFR: 8327858: Improve spliterator and forEach for single-element immutable collections [v4]

2025-04-05 Thread Chen Liang
On Fri, 11 Oct 2024 15:49:33 GMT, Chen Liang wrote: >> Please review this patch that: >> 1. Implemented `forEach` to optimize for 1 or 2 element collections. >> 2. Implemented `spliterator` to optimize for a single element. >> >> The default implementations for multiple-element immutable collect

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v27]

2025-04-05 Thread Maurizio Cimadamore
On Thu, 3 Apr 2025 12:14:52 GMT, Maurizio Cimadamore wrote: >> That was intentional as the list is always `0..size` whereas a map can use >> arbitrary inputs. Is there a better way to illustrate this than what we have >> now? > > I guess my "beef" is that the examples for int function and func

Re: RFR: 8352044: Add --with-import-jvms to configure

2025-04-05 Thread Alan Bateman
On Wed, 19 Mar 2025 12:45:23 GMT, Erik Joelsson wrote: > Just to make sure I'm understanding you correctly. Are you proposing that > instead of building a single JDK distribution with multiple JVMs, they would > build a separate JDK for each alternative JVM configuration and publish > java.bas

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v33]

2025-04-05 Thread Per Minborg
On Wed, 2 Apr 2025 14:04:52 GMT, Alan Bateman wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add info that Map#values and Map#entrySet are stable > > src/java.base/share/classes/java/lang/StableValue.java line 649:

Re: RFR: 8352016: Improve java/lang/RuntimeTests/RuntimeExitLogTest.java

2025-04-05 Thread Mikhail Yankelevich
On Fri, 14 Mar 2025 09:17:06 GMT, KIRIYAMA Takuya wrote: > The current test program for the logging feature added in JDK-8301627 does > not fully check some important cases. > > Issue Details: > The test does not properly check cases where logging might not happen due to > different logging le

Re: RFR: 8352642: Set zipinfo-time=false when constructing zipfs FileSystem in com.sun.tools.javac.file.JavacFileManager$ArchiveContainer for better performance

2025-04-05 Thread Jaikiran Pai
On Sun, 23 Mar 2025 12:38:04 GMT, Jason Zaugg wrote: > 8352642: Set zipinfo-time=false when constructing zipfs FileSystem in > com.sun.tools.javac.file.JavacFileManager$ArchiveContainer for better > performance I'm running some tests with this change. I'll approve it once that completes.

Re: RFR: 8352088: Call of com.sun.jdi.ThreadReference.threadGroups() can lock up target VM [v7]

2025-04-05 Thread Chris Plummer
On Tue, 1 Apr 2025 20:00:22 GMT, Chris Plummer wrote: >> Calling ThreadGroupReference.groups() from an event handler can cause a >> deadlock. Details in first comment. Tested with :jdk_lang on all supported >> platforms and tier1, tier2, tier3, and tier5 svc testing. > > Chris Plummer has updat

Re: RFR: 8352016: Improve java/lang/RuntimeTests/RuntimeExitLogTest.java [v2]

2025-04-05 Thread Jaikiran Pai
On Fri, 21 Mar 2025 09:05:27 GMT, KIRIYAMA Takuya wrote: >> The current test program for the logging feature added in JDK-8301627 does >> not fully check some important cases. >> >> Issue Details: >> The test does not properly check cases where logging might not happen due to >> different logg

Re: RFR: 8352906: stdout/err.encoding on Windows set by incorrect Win32 call [v3]

2025-04-05 Thread Alan Bateman
On Thu, 27 Mar 2025 16:03:08 GMT, Naoto Sato wrote: >> Those system property values on Windows were derived from Windows' >> `GetConsoleCP()` call, but they should have been taken from >> `GetConsoleOutputCP()`. Replacing the incorrect call with the correct one >> won't change any behavior, as

RFR: 8353795: Add Writer.of(StringBuilder)

2025-04-05 Thread Markus KARG
This Pull Requests proposes an implementation for [JDK-8353795](https://bugs.openjdk.org/browse/JDK-8353795): Adding the new method `public static Writer Writer.of(StringBuilder)`, providing a non-synchronized Writer implementation optimized for writing into `StringBuilder`. A basic test is pr

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v33]

2025-04-05 Thread Per Minborg
> Implement JEP 502. > > The PR passes tier1-tier3 tests. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Add info that Map#values and Map#entrySet are stable - Changes: - all: https://git.openjdk.org/jdk/pull/23972/fi

Re: RFR: 8352773: JVMTI should disable events during java upcalls

2025-04-05 Thread Chris Plummer
On Tue, 25 Mar 2025 20:36:28 GMT, Chris Plummer wrote: > Calling ThreadGroupReference.groups() from an event handler can cause a > deadlock. Details in first comment. Tested with :jdk_lang on all supported > platforms and tier1, tier2, tier3, and tier5 svc testing. The reason is because this J

Re: RFR: 8352419: Test tools/jpackage/share/ErrorTest.java#id0 and #id1 fail [v2]

2025-04-05 Thread Arno Zeller
On Tue, 1 Apr 2025 19:00:56 GMT, Alexey Semenyuk wrote: >> Make tools/jpackage/share/ErrorTest.java test safely handle the case when >> native bundling is unavailable on the test host. >> >> Additionally: >> - If native bundling is unavailable on the test host, PackageTest will >> throw `jtre

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v3]

2025-04-05 Thread Markus KARG
On Wed, 26 Mar 2025 11:34:34 GMT, Markus KARG wrote: >> src/java.base/share/classes/java/lang/CharSequence.java line 307: >> >>> 305: /** >>> 306: * Characters are copied from this sequence into the >>> 307: * destination character array {@code dst}. The first character to >> >> I

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v33]

2025-04-05 Thread Maurizio Cimadamore
On Thu, 3 Apr 2025 08:22:47 GMT, Per Minborg wrote: > "A stable value is a holder of content that can be lazily computed at most > once" I'd replace `computed` with `set` (as that's the term we use in the API). - PR Review Comment: https://git.openjdk.org/jdk/pull/23972#discussion

Re: RFR: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output" [v3]

2025-04-05 Thread Brent Christian
> I propose some cleanups to `FinalizerHistogramTest.java` to hopefully clear > up the intermittent failures: > > * run with `othervm`: this test blocks the (global) finalizer thread, and > also requires the (global) finalizer thread to enter the test's `finalize()` > method > * The test uses `

Integrated: 8319447: Improve performance of delayed task handling

2025-04-05 Thread Doug Lea
On Wed, 19 Feb 2025 16:07:56 GMT, Doug Lea wrote: > (Copied from https://bugs.openjdk.org/browse/JDK-8319447) > > The problems addressed by this CR/PR are that ScheduledThreadPoolExecutor is > both ill-suited for many (if not most) of its applications, and is a > performance bottleneck (as see

Re: RFR: 8347712: IllegalStateException on multithreaded ZipFile access with non-UTF8 charset [v5]

2025-04-05 Thread Jaikiran Pai
> Can I please get a review of this change which proposes to fix an issue > `java.util.zip.ZipFile` which would cause failures when multiple instances of > `ZipFile` using non-UTF8 `Charset` were operating against the same underlying > ZIP file? This addresses https://bugs.openjdk.org/browse/JDK

Re: RFR: 8352489: Relax jspawnhelper version checks to informative

2025-04-05 Thread Alan Bateman
On Thu, 20 Mar 2025 09:52:02 GMT, Aleksey Shipilev wrote: > See the bug for rationale. > > This goal for this improvement is to be easily backportable, so we can catch > up with update releases. As such, it does a few borderline-trivial changes, > and _does not_ change the jspawnhelper protoc

Re: JDK-8352891 Performance improvements to ByteArrayOutputStream

2025-04-05 Thread Scott Palmer
Other than the read-only aspect, is ByteBuffer pretty close to the builder you are looking for? I would think a thin wrapper over a ByteBuffer might be a suitable alternative. Just a quick thought, I haven’t looked at any proposed code.ScottOn Mar 28, 2025, at 6:09 PM, Archie Cobbs wrote:This is

Re: RFR: 8342869: Errors related to unused code on Windows after 8339120 in awt

2025-04-05 Thread Julian Waters
On Wed, 23 Oct 2024 05:07:37 GMT, Julian Waters wrote: > After 8339120, gcc began catching many different instances of unused code in > the Windows specific codebase. Some of these seem to be bugs. I've taken the > effort to mark out all the relevant globals and locals that trigger the > unuse

RFR: 8352171: Arrays.hashCode for sub-range of byte array API addition

2025-04-05 Thread Zihao Lin
Add the java.util.Arrays.hashCode(byte[], int start, int end). Hi team, I am new here, please give me some guidance. Thank you. - Commit messages: - 8352171: Arrays.hashCode for sub-range of byte array API addition Changes: https://git.openjdk.org/jdk/pull/24128/files Webrev: htt

Re: RFR: 8352289: [macos] Review skipped tests in tools/jpackage/macosx/SigningPackage*

2025-04-05 Thread Alexey Semenyuk
On Mon, 24 Mar 2025 14:35:50 GMT, Alexey Semenyuk wrote: > Follow-up for https://github.com/openjdk/jdk/pull/24087 PR. > Revamp signing tests: > - Run the tests only if `jpackage.test.MacSignTests` property is set to > "run". This property also can be set to "setup" and "teardown" to set up an

Re: RFR: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output" [v4]

2025-04-05 Thread Andrey Turbanov
On Fri, 28 Mar 2025 01:08:42 GMT, Brent Christian wrote: >> I propose some cleanups to `FinalizerHistogramTest.java` to hopefully clear >> up the intermittent failures: >> >> * run with `othervm`: this test blocks the (global) finalizer thread, and >> also requires the (global) finalizer threa

Re: RFR: 8352064: AIX: now also able to build static-jdk image with a statically linked launcher

2025-04-05 Thread Joachim Kern
On Fri, 14 Mar 2025 15:41:56 GMT, Joachim Kern wrote: > After "JDK-8339480: Build static-jdk image with a statically linked launcher" > AIX was not able to build the new target. Therefore with "JDK-8345590 AIX > 'make all' fails after JDK-8339480" the new target was disabled again. > > Now wit

Re: RFR: 8352693: Use a simpler console reader instead of JLine for System.console()

2025-04-05 Thread Jan Lahoda
On Thu, 27 Mar 2025 18:28:17 GMT, Naoto Sato wrote: >> The `java.io.Console` has several backends: a simple on in `java.base`, a >> more convenient one in `jdk.internal.le` (with line-reading based on JLine) >> and one for JShell. >> >> The backend based on JLine is proving to be a somewhat pr

Re: RFR: 8352716: (tz) Update Timezone Data to 2025b

2025-04-05 Thread Naoto Sato
On Tue, 25 Mar 2025 16:52:28 GMT, Naoto Sato wrote: > Incorporating the latest IANA Time Zone Database (2025b). Manually confirmed > the newly introduced time zone stays at the same offset (-03) on/after > 2025-04-06: > > jshell> > ZoneId.of("America/Coyhaique").getRules().getValidOffsets(Loc

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v21]

2025-04-05 Thread Per Minborg
On Mon, 31 Mar 2025 15:15:31 GMT, Maurizio Cimadamore wrote: > > Here are the latest benchmarks run on an M1 (macOS): > > ``` > > Benchmark Mode Cnt Score > > Error Units > > StableFunctionBenchmark.functionavgt 10 4.228 ? >

Re: RFR: 8350462: MethodTypeForm.LF_INTERPRET can cache the MemberName instead

2025-04-05 Thread Chen Liang
On Sat, 5 Apr 2025 14:26:13 GMT, Zihao Lin wrote: > Modify the cache in MethodTypeForm that currently stores the LF_INTERPRET > Lambda form. Instead of caching the entire LambdaForm, change it to store a > SoftReference. This will avoid unnecessary memory usage. src/java.base/share/classes/jav

Integrated: 8352184: Jtreg tests using CommandLineOptionTest.getVMTypeOption() and optionsvalidation.JVMOptionsUtils fail on static JDK

2025-04-05 Thread Jiangli Zhou
On Sat, 22 Mar 2025 03:46:38 GMT, Jiangli Zhou wrote: > Please review following changes, thanks. > > - Add `static` to the vm_info for static JDK. The `-version` output now > contains `static` on static JDK, e.g.: > > > $ static-jdk/bin/java -version > openjdk version "25-internal" 2025-09-16

Re: RFR: 8352693: Use a simpler console reader instead of JLine for System.console() [v2]

2025-04-05 Thread Jan Lahoda
> The `java.io.Console` has several backends: a simple on in `java.base`, a > more convenient one in `jdk.internal.le` (with line-reading based on JLine) > and one for JShell. > > The backend based on JLine is proving to be a somewhat problematic - JLine is > very powerful, possibly too powerfu