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

2025-04-09 Thread Per Minborg
> Implement JEP 502. > > The PR passes tier1-tier3 tests. Per Minborg has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 307 commits: - Fix typo - Merge branch 'master' into implement-jep502 - Fix typo in return type - Change double

Re: RFR: 8353741: Improve UUID.toString performance by using SIMD within a register instead of table lookup [v3]

2025-04-09 Thread Shaojin Wen
On Tue, 8 Apr 2025 18:04:43 GMT, Johannes Graham wrote: > Have you considered removing `reverseBytes` and using `ByteArray` instead of > `ByteArrayLittleEndian`? I tested it on a MacBook M1 Max, and the performance of using reverseBytes + ByteArrayLittleEndian is about 1% faster. Considering t

Re: RFR: 8350075: Performance difference between SegmentAllocator methods [v2]

2025-04-09 Thread Per Minborg
> This PR proposes to add `@ForceInline` to the `default` methods in > `SegmentAllocator` that do not already have it. Per Minborg 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

Re: RFR: 8352730: RISC-V: Disable tests in qemu-user [v3]

2025-04-09 Thread Fei Yang
On Mon, 31 Mar 2025 10:45:54 GMT, Robbin Ehn wrote: >> Hi, for you to consider. >> >> These tests constantly fails in qemu-user. >> Either the require host to be same arch explicit or implicit (sysroot). >> E.g. "ptrace(PTRACE_ATTACH, ..) failed for 405157: Function not >> implemented'" for SA

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v4]

2025-04-09 Thread Ioi Lam
On Mon, 7 Apr 2025 07:46:52 GMT, Timofei Pushkin wrote: >> If a base class is package-private then its subclasses should have the same >> package name and defining class loader, otherwise `IllegalAccessError` is >> thrown when linking a subclass. Currently when dumping a static archive >> sepa

Re: RFR: 8351757: Test java/foreign/TestDeadlock.java#FileChannel_map timed out after passing

2025-04-09 Thread Roger Riggs
On Tue, 8 Apr 2025 13:59:11 GMT, Per Minborg wrote: > This PR proposes to increase the timeout values for two tests. Marked as reviewed by rriggs (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/24511#pullrequestreview-2753292005

Re: RFR: 8344706: Compiler Implementation of Compact Source Files and Instance Main Methods [v4]

2025-04-09 Thread Stuart Marks
On Wed, 9 Apr 2025 17:02:52 GMT, Stuart Marks wrote: >> The readln methods handle malformed-input and unmappable-character errors by >> dropping, and using a replacement value. So erroneous input doesn't throw >> IOError with a CharacterCodingException as the cause. >> >> System.in.close() wou

Integrated: 8341641: Make %APPDATA% and %LOCALAPPDATA% env variables available in *.cfg files

2025-04-09 Thread Alexey Semenyuk
On Wed, 5 Mar 2025 21:13:44 GMT, Alexey Semenyuk wrote: > jpackage app laucnher will expand environment variables in .cfg files. > > Previously jpackage app launcher only replaced `$APPDIR`, `$BINDIR`, and > `$ROOTDIR` tokens with the corresponding path values. With this patch, any > environme

Re: RFR: 8341641: Make %APPDATA% and %LOCALAPPDATA% env variables available in *.cfg files [v10]

2025-04-09 Thread Alexander Matveev
On Wed, 9 Apr 2025 20:56:03 GMT, Alexey Semenyuk wrote: >> jpackage app laucnher will expand environment variables in .cfg files. >> >> Previously jpackage app launcher only replaced `$APPDIR`, `$BINDIR`, and >> `$ROOTDIR` tokens with the corresponding path values. With this patch, any >> envi

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v2]

2025-04-09 Thread Brent Christian
On Wed, 9 Apr 2025 22:34:13 GMT, Kim Barrett wrote: >> Brent Christian has updated the pull request incrementally with one >> additional commit since the last revision: >> >> only add wFRP to WhiteBox for now > > test/lib/jdk/test/whitebox/WhiteBox.java line 574: > >> 572: Class refC

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v3]

2025-04-09 Thread Brent Christian
On Tue, 8 Apr 2025 21:16:22 GMT, Roger Riggs wrote: >> Brent Christian has updated the pull request incrementally with one >> additional commit since the last revision: >> >> reflection improvements > > test/lib/jdk/test/lib/util/ForceGC.java line 125: > >> 123: Method[] meth

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v3]

2025-04-09 Thread Brent Christian
> Certain specific types of tests involving GC and reference processing need to > account for the delay between a GC completing (during which the GC clears a > Reference), and the Reference being added to its associated queue. At > present, ad hoc mechanisms (with delays/timeout) are used, but c

Re: JDK-8352891 Performance improvements to ByteArrayOutputStream

2025-04-09 Thread Chen Liang
Hi John Engebretson, I still wonder if we can make the byte array allocator a utility to the JDK, at least an internal one. I find that besides replacing BAOS uses, it can also optimize users like InputStream.readNBytes, BufWriterImpl of classfile, and maybe many more usages. Such an internal addit

Re: RFR: 8352748: Remove com.sun.tools.classfile from the JDK [v2]

2025-04-09 Thread Chen Liang
On Wed, 9 Apr 2025 15:04:24 GMT, Chen Liang wrote: >> With all dependencies of com.sun.tools.classfile in the JDK converted to the >> ClassFile API, we can remove this legacy library for release 25 like how we >> removed ASM. >> >> Testing: built locally, running tier 1-3 tests >> >> Don't kn

Re: RFR: 8341641: Make %APPDATA% and %LOCALAPPDATA% env variables available in *.cfg files

2025-04-09 Thread Alexey Semenyuk
On Thu, 6 Mar 2025 02:18:56 GMT, Alexander Matveev wrote: >> jpackage app laucnher will expand environment variables in .cfg files. >> >> Previously jpackage app launcher only replaced `$APPDIR`, `$BINDIR`, and >> `$ROOTDIR` tokens with the corresponding path values. With this patch, any >> en

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v2]

2025-04-09 Thread Kim Barrett
On Wed, 9 Apr 2025 19:54:55 GMT, Brent Christian wrote: >> Certain specific types of tests involving GC and reference processing need >> to account for the delay between a GC completing (during which the GC clears >> a Reference), and the Reference being added to its associated queue. At >> pr

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

2025-04-09 Thread Martin Doerr
On Fri, 4 Apr 2025 08:10:34 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

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

2025-04-09 Thread Justin Lu
On Wed, 9 Apr 2025 15:06:32 GMT, Magnus Ihse Bursie wrote: >> Justin Lu has updated the pull request with a new target base due to a merge >> or a rebase. The pull request now contains 16 commits: >> >> - Convert the merged master changes to UTF-8 >> - Merge master and fix conflicts >> - Clo

Re: RFR: 8341641: Make %APPDATA% and %LOCALAPPDATA% env variables available in *.cfg files [v10]

2025-04-09 Thread Alexey Semenyuk
> jpackage app laucnher will expand environment variables in .cfg files. > > Previously jpackage app launcher only replaced `$APPDIR`, `$BINDIR`, and > `$ROOTDIR` tokens with the corresponding path values. With this patch, any > environment variable can be expanded. The syntax is shell-like > `

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

2025-04-09 Thread Stuart Marks
On Tue, 8 Apr 2025 11:00:27 GMT, David Beaumont wrote: > 8353683: 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 me

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

2025-04-09 Thread Magnus Ihse Bursie
On Wed, 9 Apr 2025 16:10:20 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 >> (

Re: RFR: 8354138: LinkedBlockingDeque allows us to exceed size with addAll()

2025-04-09 Thread kabutz
On Wed, 9 Apr 2025 11:43:16 GMT, Chen Liang wrote: >> In LinkedBlockingDeque.addAll() we first build up the chain of nodes and >> then add that chain in bulk to the existing nodes. We count the nodes in >> "int n" and then whilst holding the lock, we check that we haven't exceeded >> the capac

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v2]

2025-04-09 Thread Brent Christian
On Tue, 8 Apr 2025 22:44:57 GMT, Kim Barrett wrote: >> Brent Christian has updated the pull request incrementally with one >> additional commit since the last revision: >> >> only add wFRP to WhiteBox for now > > test/lib/jdk/test/lib/util/ForceGC.java line 117: > >> 115: * jtreg tag. >

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v2]

2025-04-09 Thread Brent Christian
On Tue, 8 Apr 2025 22:55:53 GMT, Brent Christian wrote: >> test/lib/jdk/test/whitebox/WhiteBox.java line 569: >> >>> 567:* This method should usually be called after a call to >>> WhiteBox.fullGC(). >>> 568:*/ >>> 569: public static void waitForReferenceProcessing() { >> >> Can the c

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v2]

2025-04-09 Thread Brent Christian
> Certain specific types of tests involving GC and reference processing need to > account for the delay between a GC completing (during which the GC clears a > Reference), and the Reference being added to its associated queue. At > present, ad hoc mechanisms (with delays/timeout) are used, but c

Re: RFR: 8336881: [Linux] Support for hierarchical limits for Metrics [v17]

2025-04-09 Thread Severin Gehwolf
On Tue, 1 Apr 2025 14:59:37 GMT, Severin Gehwolf wrote: >> Please review this fix for cgroups-based metrics reporting in the >> `jdk.internal.platform` package. This fix is supposed to address wrong >> reporting of certain limits if the limits aren't set at the leaf nodes. >> >> For example, o

Re: RFR: 8351740: Clean up some code around initialization of encoding properties [v2]

2025-04-09 Thread Naoto Sato
On Mon, 7 Apr 2025 23:43:29 GMT, Stuart Marks wrote: >> Some of the code that creates various encoding properties at JVM >> initialization time, such as file.encoding and native.encoding, could use >> some cleaning up. Cleanup is fairly minimal and should be mostly >> behavior-preserving. Chan

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v6]

2025-04-09 Thread Timofei Pushkin
> If a base class is package-private then its subclasses should have the same > package name and defining class loader, otherwise `IllegalAccessError` is > thrown when linking a subclass. Currently when dumping a static archive > separate `URLClassLoader`s are used for each unregistered classes'

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

2025-04-09 Thread Alan Bateman
On Wed, 2 Apr 2025 16:59:16 GMT, Jan Lahoda wrote: >> 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: > > Reflecti

Re: RFR: 8353888: Implement Key Derivation Function API [v3]

2025-04-09 Thread Weijun Wang
> Finalize the KDF API. Weijun Wang has updated the pull request incrementally with one additional commit since the last revision: update @since tags as required by JEP 12 - Changes: - all: https://git.openjdk.org/jdk/pull/24520/files - new: https://git.openjdk.org/jdk/pull/2

Re: RFR: 8333377: Migrate Generic Signature parsing to ClassFile API [v6]

2025-04-09 Thread Chen Liang
> Core reflection's generic signature parsing uses an ancient library with > outdated visitor pattern on a tree model and contains unnecessary > boilerplates. This is a duplication of ClassFile API's signature model. We > should just move to ClassFile API, which is more throughoutly tested as we

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

2025-04-09 Thread Rémi Forax
On Mon, 7 Apr 2025 16:00:41 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: > > Fix typo in return type Hello, I do not know if you know but

Integrated: 8354121: Use a record class rather than a lambda in AbstractMemorySegmentImpl::cleanupAction

2025-04-09 Thread Per Minborg
On Tue, 8 Apr 2025 14:47:04 GMT, Per Minborg wrote: > This PR proposes to use an anonymous class rather than a lambda in order to > improve startup time. > > We need to make sure the regression is fixed by this. It might be the case > that the regression is there because > [JDK-8347047](https

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

2025-04-09 Thread Rémi Forax
On Mon, 7 Apr 2025 16:00:41 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: > > Fix typo in return type src/java.base/share/classes/java/lang

Re: RFR: 8352504: RISC-V: implement and enable CMoveI/L

2025-04-09 Thread Hamlin Li
On Wed, 9 Apr 2025 06:41:51 GMT, Fei Yang wrote: > Sorry for not being clear enough. I am suggesting this: if (UseZicond) { FLAG_SET_DEFAULT(ConditionalMoveLimit, 3); } I think this depends on whether we should enable ConditionalMoveLimit based on `UseZicond`? So, I'll leave it until

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

2025-04-09 Thread Chen Liang
On Tue, 8 Apr 2025 11:00:27 GMT, David Beaumont wrote: > 8353683: 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 me

Re: RFR: 8354111: JavaDoc states that Iterator.remove() is linear in the LinkedBlockingDeque

2025-04-09 Thread Chen Liang
On Tue, 8 Apr 2025 08:50:37 GMT, kabutz wrote: > One of the features of the LinkedBlockingDeque is that it is a doubly-linked > node queue, with pointers in each node to "prev" and "next", which allows > remove() in the Iterator to remove the node in constant time. However, in the > JavaDoc of

Re: RFR: 8344706: Compiler Implementation of Compact Source Files and Instance Main Methods [v3]

2025-04-09 Thread Stuart Marks
On Wed, 9 Apr 2025 10:36:53 GMT, Alan Bateman wrote: >> The IOError was carried over from Console.readLine(), which throws IOError >> on error. Of course we're decoupled from Console now, but that was the >> original reason. >> >> My guess is that Console methods throw IOError because (a) they

Re: RFR: 8344706: Compiler Implementation of Compact Source Files and Instance Main Methods [v3]

2025-04-09 Thread Stuart Marks
On Wed, 9 Apr 2025 10:46:40 GMT, Alan Bateman wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Rewrite bits about charset decoding, removing mention of "internal >> objects." > > src/java.base/share/classes/java/lang

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v5]

2025-04-09 Thread Timofei Pushkin
On Wed, 9 Apr 2025 09:03:41 GMT, Timofei Pushkin wrote: >> src/java.base/share/classes/jdk/internal/misc/CDS.java line 438: >> >>> 436: // class loader. Thus it is safe to delegate their loading >>> to system class loader >>> 437: // (our parent) - this is what the defau

RE: JDK-8352891 Performance improvements to ByteArrayOutputStream

2025-04-09 Thread Engebretson, John
I think there is agreement that ByteArrayOutputStream.unsynchronized(int cap) (or some such method) would be useful. It would not require using a contiguous byte[] as the backing array so there is scope to experiment with implementations that don't need to resize like the base BAOS does. Extend

Re: RFR: 8354121: Use an anonymous class rather than a lambda in AbstractMemorySegmentImpl::cleanupAction [v3]

2025-04-09 Thread Per Minborg
> This PR proposes to use an anonymous class rather than a lambda in order to > improve startup time. > > We need to make sure the regression is fixed by this. It might be the case > that the regression is there because > [JDK-8347047](https://bugs.openjdk.org/browse/JDK-8347047) actually fixed

Re: RFR: 8353917: jnativescan: Simplify ClassResolver [v2]

2025-04-09 Thread Jorn Vernee
> `jnativescan` uses the `ClassResolver` class to find both system classes, as > well as application classes. In principle, a class resolver supports both > iterating over all classes from that particular source, as well as looking up > classes by name. However, the `ClassResolver` for system cl

Re: RFR: 8352748: Remove com.sun.tools.classfile from the JDK [v2]

2025-04-09 Thread Vicente Romero
On Wed, 9 Apr 2025 15:04:24 GMT, Chen Liang wrote: >> With all dependencies of com.sun.tools.classfile in the JDK converted to the >> ClassFile API, we can remove this legacy library for release 25 like how we >> removed ASM. >> >> Testing: built locally, running tier 1-3 tests >> >> Don't kn

Integrated: 8353840: JNativeScan should not abort for missing classes

2025-04-09 Thread Danish Nawab
On Tue, 8 Apr 2025 08:18:36 GMT, Danish Nawab wrote: > ## Description > > https://bugs.openjdk.org/browse/JDK-8353840 > > ### Existing behavior > Log the error message and terminate in case of missing system class > > > $ jnativescan --class-path reactor-core-3.7.4.jar; echo "Exit code: $?"

Re: RFR: 8353840: JNativeScan should not abort for missing classes [v3]

2025-04-09 Thread Chen Liang
On Tue, 8 Apr 2025 13:51:59 GMT, Danish Nawab wrote: >> ## Description >> >> https://bugs.openjdk.org/browse/JDK-8353840 >> >> ### Existing behavior >> Log the error message and terminate in case of missing system class >> >> >> $ jnativescan --class-path reactor-core-3.7.4.jar; echo "Exit c

Integrated: 8351462: Improve robustness of String concatenation

2025-04-09 Thread Raffaello Giulietti
On Wed, 9 Apr 2025 12:57:47 GMT, Raffaello Giulietti wrote: > Early detection of an `int` overflow in `StringConcatHelper` improves > robustness of `StringConcatFactory`. This pull request has now been integrated. Changeset: 1f21da75 Author:Raffaello Giulietti URL: https://git.ope

Re: RFR: 8350075: Performance difference between SegmentAllocator methods

2025-04-09 Thread Per Minborg
On Fri, 14 Feb 2025 09:19:35 GMT, Per Minborg wrote: > This PR proposes to add `@ForceInline` to the `default` methods in > `SegmentAllocator` that do not already have it. Keep it open. - PR Comment: https://git.openjdk.org/jdk/pull/23628#issuecomment-2790078845

Re: RFR: 8353840: JNativeScan should not abort for missing classes [v3]

2025-04-09 Thread Danish Nawab
On Tue, 8 Apr 2025 14:25:11 GMT, Danish Nawab wrote: >> Changes look good, thanks! >> >> Please note that we will have to wait 24 hours before integrating, in order >> to give other reviews time to look as well. > >> Changes look good, thanks! >> >> Please note that we will have to wait 24 hou

Re: RFR: 8352748: Remove com.sun.tools.classfile from the JDK [v2]

2025-04-09 Thread Jan Lahoda
On Wed, 9 Apr 2025 15:04:24 GMT, Chen Liang wrote: >> With all dependencies of com.sun.tools.classfile in the JDK converted to the >> ClassFile API, we can remove this legacy library for release 25 like how we >> removed ASM. >> >> Testing: built locally, running tier 1-3 tests >> >> Don't kn

Re: RFR: 8353840: JNativeScan should not abort for missing classes [v3]

2025-04-09 Thread Chen Liang
On Tue, 8 Apr 2025 13:51:59 GMT, Danish Nawab wrote: >> ## Description >> >> https://bugs.openjdk.org/browse/JDK-8353840 >> >> ### Existing behavior >> Log the error message and terminate in case of missing system class >> >> >> $ jnativescan --class-path reactor-core-3.7.4.jar; echo "Exit c

Re: RFR: 8353840: JNativeScan should not abort for missing classes [v3]

2025-04-09 Thread Chen Liang
On Tue, 8 Apr 2025 14:25:11 GMT, Danish Nawab wrote: >> Changes look good, thanks! >> >> Please note that we will have to wait 24 hours before integrating, in order >> to give other reviews time to look as well. > >> Changes look good, thanks! >> >> Please note that we will have to wait 24 hou

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

2025-04-09 Thread Magnus Ihse Bursie
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: 8342382: Implementation of JEP G1: Improve Application Throughput with a More Efficient Write-Barrier [v30]

2025-04-09 Thread Thomas Schatzl
On Tue, 8 Apr 2025 19:59:09 GMT, Albert Mingkun Yang wrote: >> Thomas Schatzl has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 39 commits: >> >> - * missing file from merge >> - Merge branch 'master' into 8342382-card-table-inste

Re: RFR: 8353840: JNativeScan should not throw error for missing system classes [v3]

2025-04-09 Thread duke
On Tue, 8 Apr 2025 13:51:59 GMT, Danish Nawab wrote: >> ## Description >> >> https://bugs.openjdk.org/browse/JDK-8353840 >> >> ### Existing behavior >> Log the error message and terminate in case of missing system class >> >> >> $ jnativescan --class-path reactor-core-3.7.4.jar; echo "Exit c

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

2025-04-09 Thread David Beaumont
On Tue, 8 Apr 2025 16:15:13 GMT, Chen Liang wrote: >> 8353683: 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

Re: RFR: 8351740: Clean up some code around initialization of encoding properties [v2]

2025-04-09 Thread Stuart Marks
> Some of the code that creates various encoding properties at JVM > initialization time, such as file.encoding and native.encoding, could use > some cleaning up. Cleanup is fairly minimal and should be mostly > behavior-preserving. Changes include the following: > > * In the java_props.h and j

Re: RFR: 8351462: Improve robustness of String concatenation [v2]

2025-04-09 Thread Chen Liang
On Wed, 9 Apr 2025 13:32:00 GMT, Raffaello Giulietti wrote: >> Early detection of an `int` overflow in `StringConcatHelper` improves >> robustness of `StringConcatFactory`. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision:

Re: RFR: 8351462: Improve robustness of String concatenation [v2]

2025-04-09 Thread Per Minborg
On Wed, 9 Apr 2025 13:32:00 GMT, Raffaello Giulietti wrote: >> Early detection of an `int` overflow in `StringConcatHelper` improves >> robustness of `StringConcatFactory`. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision:

Re: RFR: 8354121: Use an anonymous class rather than a lambda in AbstractMemorySegmentImpl::cleanupAction [v3]

2025-04-09 Thread Chen Liang
On Wed, 9 Apr 2025 13:02:08 GMT, Per Minborg wrote: >> This PR proposes to use an anonymous class rather than a lambda in order to >> improve startup time. >> >> We need to make sure the regression is fixed by this. It might be the case >> that the regression is there because >> [JDK-8347047]

Re: RFR: 8351462: Improve robustness of String concatenation

2025-04-09 Thread Raffaello Giulietti
On Wed, 9 Apr 2025 12:57:47 GMT, Raffaello Giulietti wrote: > Early detection of an `int` overflow in `StringConcatHelper` improves > robustness of `StringConcatFactory`. Oops... Done - PR Comment: https://git.openjdk.org/jdk/pull/24546#issuecomment-2789740924

Re: RFR: 8351462: Improve robustness of String concatenation [v2]

2025-04-09 Thread Raffaello Giulietti
> Early detection of an `int` overflow in `StringConcatHelper` improves > robustness of `StringConcatFactory`. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: Bumped copyright year. - Changes: - all: https://gi

Re: RFR: 8351462: Improve robustness of String concatenation

2025-04-09 Thread Chen Liang
On Wed, 9 Apr 2025 12:57:47 GMT, Raffaello Giulietti wrote: > Early detection of an `int` overflow in `StringConcatHelper` improves > robustness of `StringConcatFactory`. We can bump the copyright year. - PR Comment: https://git.openjdk.org/jdk/pull/24546#issuecomment-2789723891

Re: RFR: 8354111: JavaDoc states that Iterator.remove() is linear in the LinkedBlockingDeque

2025-04-09 Thread kabutz
On Wed, 9 Apr 2025 12:36:21 GMT, Chen Liang wrote: > Thanks! FYI the CSR requires a few more fields to be filled - see > https://wiki.openjdk.org/display/csr/Fields+of+a+CSR+Request for details. You > can click the "Edit" button on the CSR to see all those fields; many are not > available in t

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

2025-04-09 Thread Severin Gehwolf
On Wed, 9 Apr 2025 11:42:31 GMT, Magnus Ihse Bursie wrote: >> Sure. It's not really a properties file (which assumes `key=value`). How >> about `upgrade_files_.conf`? Then the pattern could be >> `upgrade_files_*.conf`. Thoughts? > > Yeah, my comment was meant more like "maybe you should turn i

RFR: 8351462: Improve robustness of String concatenation

2025-04-09 Thread Raffaello Giulietti
Early detection of an `int` overflow in `StringConcatHelper` improves robustness of `StringConcatFactory`. - Commit messages: - 8351462: Improve robustness of String concatenation Changes: https://git.openjdk.org/jdk/pull/24546/files Webrev: https://webrevs.openjdk.org/?repo=jdk&

Re: RFR: 8354111: JavaDoc states that Iterator.remove() is linear in the LinkedBlockingDeque

2025-04-09 Thread Alan Bateman
On Tue, 8 Apr 2025 08:50:37 GMT, kabutz wrote: > One of the features of the LinkedBlockingDeque is that it is a doubly-linked > node queue, with pointers in each node to "prev" and "next", which allows > remove() in the Iterator to remove the node in constant time. However, in the > JavaDoc of

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

2025-04-09 Thread Zihao Lin
On Mon, 7 Apr 2025 19:16:11 GMT, Chen Liang wrote: >> OK, removed it. > > Now the index 6 is left unused in the LF cache array - we can leave it empty > and renumber the cache indices when we add a new entry to cache. Got it, thanks for the explanation. - PR Review Comment: https:

Re: RFR: 8352504: RISC-V: implement and enable CMoveI/L [v2]

2025-04-09 Thread Hamlin Li
> Hi, > Can you help to review this patch? > On riscv, CMoveI/L already were implemented, but there are some gap: > 1. CMoveI/L does not support comparison with float/double, corresponding > tests are not turn on either. > 2. Some optimization of C2 is not turned on, e.g. `Phi -> CMove -> min_max`

Re: RFR: 8351927: Change VirtualThread implementation to use use FJP delayed task handling

2025-04-09 Thread Viktor Klang
On Wed, 9 Apr 2025 05:56:28 GMT, Alan Bateman wrote: >> src/java.base/share/classes/java/lang/VirtualThread.java line 889: >> >>> 887: private void parkTimeoutExpired() { >>> 888: assert !VirtualThread.currentThread().isVirtual(); >>> 889: if (!getAndSetParkPermit(true) >> >

Integrated: 8351757: Test java/foreign/TestDeadlock.java#FileChannel_map timed out after passing

2025-04-09 Thread Per Minborg
On Tue, 8 Apr 2025 13:59:11 GMT, Per Minborg wrote: > This PR proposes to increase the timeout values for two tests. This pull request has now been integrated. Changeset: f9d705b1 Author:Per Minborg URL: https://git.openjdk.org/jdk/commit/f9d705b17e5d90f7bc5f9759f692182bb4da3445 Sta

Integrated: 8351927: Change VirtualThread implementation to use use FJP delayed task handling

2025-04-09 Thread Alan Bateman
On Thu, 13 Mar 2025 10:48:14 GMT, Alan Bateman wrote: > Follow up to JDK-8319447 to change the VirtualThread implementation to use > FJP's delayed task handling. > > The SPTE based implementation is not removed. It will continue to be used by > tests. If custom schedulers are exposed in the fu

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

2025-04-09 Thread Thomas Schatzl
On Wed, 9 Apr 2025 11:34:09 GMT, Roberto Castañeda Lozano wrote: >> Thomas Schatzl has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 39 commits: >> >> - * missing file from merge >> - Merge branch 'master' into 8342382-card-table

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

2025-04-09 Thread Thomas Schatzl
On Wed, 9 Apr 2025 11:35:26 GMT, Roberto Castañeda Lozano wrote: >> Thomas Schatzl has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 39 commits: >> >> - * missing file from merge >> - Merge branch 'master' into 8342382-card-table

Re: RFR: 8354111: JavaDoc states that Iterator.remove() is linear in the LinkedBlockingDeque

2025-04-09 Thread kabutz
On Wed, 9 Apr 2025 12:36:21 GMT, Chen Liang wrote: >> One of the features of the LinkedBlockingDeque is that it is a doubly-linked >> node queue, with pointers in each node to "prev" and "next", which allows >> remove() in the Iterator to remove the node in constant time. However, in >> the Ja

Re: RFR: 8354111: JavaDoc states that Iterator.remove() is linear in the LinkedBlockingDeque

2025-04-09 Thread Chen Liang
On Tue, 8 Apr 2025 08:50:37 GMT, kabutz wrote: > One of the features of the LinkedBlockingDeque is that it is a doubly-linked > node queue, with pointers in each node to "prev" and "next", which allows > remove() in the Iterator to remove the node in constant time. However, in the > JavaDoc of

Re: RFR: 8354111: JavaDoc states that Iterator.remove() is linear in the LinkedBlockingDeque

2025-04-09 Thread kabutz
On Wed, 9 Apr 2025 12:12:02 GMT, Chen Liang wrote: >> One of the features of the LinkedBlockingDeque is that it is a doubly-linked >> node queue, with pointers in each node to "prev" and "next", which allows >> remove() in the Iterator to remove the node in constant time. However, in >> the Ja

Re: RFR: 8354111: JavaDoc states that Iterator.remove() is linear in the LinkedBlockingDeque

2025-04-09 Thread Chen Liang
On Tue, 8 Apr 2025 08:50:37 GMT, kabutz wrote: > One of the features of the LinkedBlockingDeque is that it is a doubly-linked > node queue, with pointers in each node to "prev" and "next", which allows > remove() in the Iterator to remove the node in constant time. However, in the > JavaDoc of

Re: RFR: 8354111: JavaDoc states that Iterator.remove() is linear in the LinkedBlockingDeque

2025-04-09 Thread kabutz
On Tue, 8 Apr 2025 16:19:13 GMT, Chen Liang wrote: >> One of the features of the LinkedBlockingDeque is that it is a doubly-linked >> node queue, with pointers in each node to "prev" and "next", which allows >> remove() in the Iterator to remove the node in constant time. However, in >> the Ja

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

2025-04-09 Thread Roberto Castañeda Lozano
On Fri, 4 Apr 2025 08:10:34 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

Re: RFR: 8354138: LinkedBlockingDeque allows us to exceed size with addAll()

2025-04-09 Thread Chen Liang
On Wed, 9 Apr 2025 06:24:30 GMT, kabutz wrote: > In LinkedBlockingDeque.addAll() we first build up the chain of nodes and then > add that chain in bulk to the existing nodes. We count the nodes in "int n" > and then whilst holding the lock, we check that we haven't exceeded the > capacity with

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

2025-04-09 Thread Magnus Ihse Bursie
On Wed, 9 Apr 2025 11:38:25 GMT, Severin Gehwolf wrote: >> make/modules/jdk.jlink/Java.gmk line 28: >> >>> 26: >>> >>> 27: >>> 28: COPY += upgrade_files_java.base >> >> Any chance you can give this file a differe

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

2025-04-09 Thread Severin Gehwolf
On Wed, 9 Apr 2025 10:36:03 GMT, Magnus Ihse Bursie wrote: >> Severin Gehwolf has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Review v2 > > make/modules/jdk.jlink/Java.gmk line 28: > >> 26: >> ##

RFR: 8354138: LinkedBlockingDeque allows us to exceed size with addAll()

2025-04-09 Thread kabutz
In LinkedBlockingDeque.addAll() we first build up the chain of nodes and then add that chain in bulk to the existing nodes. We count the nodes in "int n" and then whilst holding the lock, we check that we haven't exceeded the capacity with "if (count + n <= capacity)". However, if we pass in a c

Re: RFR: 8344706: Compiler Implementation of Compact Source Files and Instance Main Methods [v3]

2025-04-09 Thread Alan Bateman
On Mon, 7 Apr 2025 21:07:36 GMT, Jan Lahoda wrote: >> This is a PR that implements JEP: Compact Source Files and Instance Main >> Methods. Changes include: >> - `java.io.IO` moved to `java.lang.IO`, and no longer uses >> `System.console()` to implement the methods (thanks to @stuart-marks) >> -

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

2025-04-09 Thread Magnus Ihse Bursie
On Mon, 7 Apr 2025 13:35: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 >> (

Re: RFR: 8354111: JavaDoc states that Iterator.remove() is linear in the LinkedBlockingDeque

2025-04-09 Thread kabutz
On Tue, 8 Apr 2025 16:19:13 GMT, Chen Liang wrote: >> One of the features of the LinkedBlockingDeque is that it is a doubly-linked >> node queue, with pointers in each node to "prev" and "next", which allows >> remove() in the Iterator to remove the node in constant time. However, in >> the Ja

RFR: 8354076: LinkedBlockingDeque offer() creates nodes even if capacity has been reached

2025-04-09 Thread kabutz
In the JavaDoc of LinkedBlockingDeque, it states: "Linked nodes are dynamically created upon each insertion unless this would bring the deque above capacity." However, in the current implementation, nodes are always created, even if the deque is full. This is because count is non-volatile, and w

Re: RFR: 8344706: Compiler Implementation of Compact Source Files and Instance Main Methods [v3]

2025-04-09 Thread Alan Bateman
On Mon, 7 Apr 2025 18:28:21 GMT, Stuart Marks wrote: >> Someone is bound to ask why the readln method throw but the println methods >> don't. > > The IOError was carried over from Console.readLine(), which throws IOError on > error. Of course we're decoupled from Console now, but that was the o

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

2025-04-09 Thread Albert Mingkun Yang
On Fri, 4 Apr 2025 08:10:34 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

Re: RFR: 8352748: Remove com.sun.tools.classfile from the JDK

2025-04-09 Thread Magnus Ihse Bursie
On Tue, 8 Apr 2025 20:34:09 GMT, Chen Liang wrote: > With all dependencies of com.sun.tools.classfile in the JDK converted to the > ClassFile API, we can remove this legacy library for release 25 like how we > removed ASM. > > Testing: built locally, running tier 1-3 tests > > Don't know why,

Re: RFR: 8344706: Compiler Implementation of Compact Source Files and Instance Main Methods [v3]

2025-04-09 Thread Alan Bateman
On Mon, 7 Apr 2025 21:07:36 GMT, Jan Lahoda wrote: >> This is a PR that implements JEP: Compact Source Files and Instance Main >> Methods. Changes include: >> - `java.io.IO` moved to `java.lang.IO`, and no longer uses >> `System.console()` to implement the methods (thanks to @stuart-marks) >> -

Re: RFR: 8348986: Improve coverage of enhanced exception messages [v4]

2025-04-09 Thread Michael McMahon
> Hi, > > Enhanced exception messages are designed to hide sensitive information such > as hostnames, IP > addresses from exception message strings, unless the enhanced mode for the > specific category > has been explicitly enabled. Enhanced exceptions were first introduced in > 8204233 in JD

Re: RFR: 8351927: Change VirtualThread implementation to use use FJP delayed task handling

2025-04-09 Thread Viktor Klang
On Thu, 13 Mar 2025 10:48:14 GMT, Alan Bateman wrote: > Follow up to JDK-8319447 to change the VirtualThread implementation to use > FJP's delayed task handling. > > The SPTE based implementation is not removed. It will continue to be used by > tests. If custom schedulers are exposed in the fu

Re: RFR: 8354121: Use an anonymous class rather than a lambda in AbstractMemorySegmentImpl::cleanupAction [v2]

2025-04-09 Thread Chen Liang
On Tue, 8 Apr 2025 16:40:06 GMT, Per Minborg wrote: >> This PR proposes to use an anonymous class rather than a lambda in order to >> improve startup time. >> >> We need to make sure the regression is fixed by this. It might be the case >> that the regression is there because >> [JDK-8347047]

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v5]

2025-04-09 Thread Timofei Pushkin
On Tue, 8 Apr 2025 17:36:57 GMT, Ioi Lam wrote: >> Timofei Pushkin has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Remove unnecessary scoping > > src/java.base/share/classes/jdk/internal/misc/CDS.java line 438: > >> 436: //

Re: RFR: 8352748: Remove com.sun.tools.classfile from the JDK

2025-04-09 Thread Chen Liang
On Tue, 8 Apr 2025 20:34:09 GMT, Chen Liang wrote: > With all dependencies of com.sun.tools.classfile in the JDK converted to the > ClassFile API, we can remove this legacy library for release 25 like how we > removed ASM. > > Testing: built locally, running tier 1-3 tests > > Don't know why,

Re: RFR: 8352504: RISC-V: implement and enable CMoveI/L [v2]

2025-04-09 Thread Hamlin Li
On Tue, 8 Apr 2025 15:02:27 GMT, Feilong Jiang wrote: >> Hamlin Li 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 five additional commits >> si

Re: RFR: 8351757: Test java/foreign/TestDeadlock.java#FileChannel_map timed out after passing

2025-04-09 Thread Daniel Jeliński
On Tue, 8 Apr 2025 13:59:11 GMT, Per Minborg wrote: > This PR proposes to increase the timeout values for two tests. Marked as reviewed by djelinski (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/24511#pullrequestreview-2752626632

Re: RFR: 8351927: Change VirtualThread implementation to use use FJP delayed task handling

2025-04-09 Thread Alan Bateman
On Wed, 9 Apr 2025 08:03:44 GMT, Viktor Klang wrote: >> It already does, no CAS if the current value is the new value. > > I meant the park permit. :) getAndSetParkPermit isn't changed in this PR. If the park permit is already granted then getAndSetParkPermit(true) doesn't do anything. More gen

  1   2   >