Re: RFR: 8355369: Remove setAccessible usage for setting final fields in java.util.concurrent [v2]

2025-04-24 Thread Doug Lea
On Wed, 23 Apr 2025 17:54:03 GMT, Chen Liang wrote: >> I wonder if we could just change it to return `new >> ConcurrentSkipListSet<>(m)`. COWAL could be changed to return a new object >> too. > > The set only has a map field, and AbstractSet does not define any additional > field. The map shou

Re: RFR: 8355369: Remove setAccessible usage for setting final fields in java.util.concurrent [v2]

2025-04-24 Thread Doug Lea
On Wed, 23 Apr 2025 15:22:37 GMT, Viktor Klang wrote: >> This Pull Request replaces the uses of Field + setAccessible to modify final >> fields in java.util.concurrent with Unsafe. > > Viktor Klang has updated the pull request incrementally with one additional > commit since the last revision:

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v12]

2025-04-24 Thread Hamlin Li
On Wed, 23 Apr 2025 23:55:50 GMT, Vladimir Ivanov wrote: >> Does the following check catch `UseRVV == false` case on RISC-V? >> >> public boolean isSupported(Operator op, VectorSpecies vspecies) { >> ... >> int maxLaneCount = >> VectorSupport.getMaxLaneCount(vspecies.elementType())

Re: RFR: 8347408: Create an internal method handle adapter for system calls with errno [v5]

2025-04-24 Thread Per Minborg
> As we advance, converting older JDK code to use the relatively new FFM API > requires system calls that can provide `errno` and the likes to explicitly > allocate a `MemorySegment` to capture potential error states. This can lead > to negative performance implications if not designed carefully

Re: RFR: 8355369: Remove setAccessible usage for setting final fields in java.util.concurrent [v2]

2025-04-24 Thread Alan Bateman
On Wed, 23 Apr 2025 16:23:00 GMT, Chen Liang wrote: >> Viktor Klang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Adding a releaseFence() to ConcurrentskipListSet.clone() > > Thanks. We can investigate how clone cleanups interact with

Re: RFR: 8355369: Remove setAccessible usage for setting final fields in java.util.concurrent [v2]

2025-04-24 Thread Alan Bateman
On Wed, 23 Apr 2025 15:22:37 GMT, Viktor Klang wrote: >> This Pull Request replaces the uses of Field + setAccessible to modify final >> fields in java.util.concurrent with Unsafe. > > Viktor Klang has updated the pull request incrementally with one additional > commit since the last revision:

Re: RFR: 8077587: BigInteger Roots [v30]

2025-04-24 Thread fabioromano1
> This PR implements nth root computation for `BigInteger`s using Newton method > and optimizes `BigInteger.pow(int)` method. > [Here is a proof of convergence of the recurrence > used.](https://github.com/user-attachments/files/19785045/nth_root_newton_proof_integers.pdf) fabioromano1 has updat

Re: RFR: 8077587: BigInteger Roots [v31]

2025-04-24 Thread fabioromano1
> This PR implements nth root computation for `BigInteger`s using Newton method > and optimizes `BigInteger.pow(int)` method. > [Here is a proof of convergence of the recurrence > used.](https://github.com/user-attachments/files/19785045/nth_root_newton_proof_integers.pdf) fabioromano1 has updat

Re: RFR: 8355080: java.base/jdk.internal.foreign.SystemLookup.find() doesn't work on static JDK [v3]

2025-04-24 Thread Henry Jen
On Wed, 23 Apr 2025 00:56:18 GMT, Jiangli Zhou wrote: >> Please review this PR that changes to use `NativeLibraries.loadLibrary()` >> for loading the `libsyslookup` in `jdk.internal.foreign.SystemLookup` class. >> >> `NativeLibraries.loadLibrary()` handles both the shared library and (static)

Re: RFR: 8347408: Create an internal method handle adapter for system calls with errno [v4]

2025-04-24 Thread Per Minborg
> As we advance, converting older JDK code to use the relatively new FFM API > requires system calls that can provide `errno` and the likes to explicitly > allocate a `MemorySegment` to capture potential error states. This can lead > to negative performance implications if not designed carefully

Re: RFR: 8355369: Remove setAccessible usage for setting final fields in java.util.concurrent [v2]

2025-04-24 Thread Raffaello Giulietti
On Wed, 23 Apr 2025 15:22:37 GMT, Viktor Klang wrote: >> This Pull Request replaces the uses of Field + setAccessible to modify final >> fields in java.util.concurrent with Unsafe. > > Viktor Klang has updated the pull request incrementally with one additional > commit since the last revision:

Re: RFR: 8355369: Remove setAccessible usage for setting final fields in java.util.concurrent [v2]

2025-04-24 Thread Viktor Klang
On Thu, 24 Apr 2025 11:27:32 GMT, Doug Lea wrote: >> The set only has a map field, and AbstractSet does not define any additional >> field. The map should be fine too - two fields in AbstractMap are cleared >> when cloning happens, so recreating a map from a constructor should have the >> same

Integrated: 8355369: Remove setAccessible usage for setting final fields in java.util.concurrent

2025-04-24 Thread Viktor Klang
On Wed, 23 Apr 2025 10:10:54 GMT, Viktor Klang wrote: > This Pull Request replaces the uses of Field + setAccessible to modify final > fields in java.util.concurrent with Unsafe. This pull request has now been integrated. Changeset: 356c4d9c Author:Viktor Klang URL: https://git.ope

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v13]

2025-04-24 Thread Hamlin Li
On Wed, 23 Apr 2025 23:54:01 GMT, Vladimir Ivanov wrote: >> Migrate Vector API math library (SVML and SLEEF) linkage from native code >> (in JVM) to Java FFM API. >> >> Since FFM API doesn't support vector calling conventions yet, migration >> affects only symbol lookup for now. But it still e

Re: RFR: 8355369: Remove setAccessible usage for setting final fields in java.util.concurrent [v2]

2025-04-24 Thread Viktor Klang
On Wed, 23 Apr 2025 16:23:00 GMT, Chen Liang wrote: >> Viktor Klang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Adding a releaseFence() to ConcurrentskipListSet.clone() > > Thanks. We can investigate how clone cleanups interact with

Re: RFR: 8355369: Remove setAccessible usage for setting final fields in java.util.concurrent [v2]

2025-04-24 Thread Per Minborg
On Wed, 23 Apr 2025 15:22:37 GMT, Viktor Klang wrote: >> This Pull Request replaces the uses of Field + setAccessible to modify final >> fields in java.util.concurrent with Unsafe. > > Viktor Klang has updated the pull request incrementally with one additional > commit since the last revision:

Re: RFR: 8355369: Remove setAccessible usage for setting final fields in java.util.concurrent [v2]

2025-04-24 Thread Doug Lea
On Wed, 23 Apr 2025 12:38:55 GMT, Alan Bateman wrote: >> Yeah, I originally did that, but the following patch is the "smallest >> change". >> Given that the "original code" obtained the Field instance each call, this >> is still likely a performance improvement. > > This code has always used ge

Re: RFR: 8355443: [java.io] Use @requires tag instead of exiting based on File.separatorChar value

2025-04-24 Thread Naoto Sato
On Thu, 24 Apr 2025 00:33:20 GMT, Brian Burkhalter wrote: > For tests of the `java.io` package, instead of doing this > > public static void main(String[] args) throws Exception { > if (File.separatorChar != '\') { > /* This test is only valid on win32 systems */ >

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

2025-04-24 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: 8355443: [java.io] Use @requires tag instead of exiting based on File.separatorChar value

2025-04-24 Thread Naoto Sato
On Thu, 24 Apr 2025 00:33:20 GMT, Brian Burkhalter wrote: > For tests of the `java.io` package, instead of doing this > > public static void main(String[] args) throws Exception { > if (File.separatorChar != '\') { > /* This test is only valid on win32 systems */ >

Re: RFR: 8355443: [java.io] Use @requires tag instead of exiting based on File.separatorChar value

2025-04-24 Thread Brian Burkhalter
On Thu, 24 Apr 2025 17:07:15 GMT, Naoto Sato wrote: >> So do you think that this test should be removed? If so, I think that would >> be a different PR. Thanks. > > IIUC, the test tries to create double byte path directory, so in recent jdk > it should check `sun.jnu.encoding==MS932` (it still

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v13]

2025-04-24 Thread Jatin Bhateja
On Wed, 23 Apr 2025 23:54:01 GMT, Vladimir Ivanov wrote: >> Migrate Vector API math library (SVML and SLEEF) linkage from native code >> (in JVM) to Java FFM API. >> >> Since FFM API doesn't support vector calling conventions yet, migration >> affects only symbol lookup for now. But it still e

Re: RFR: 8355443: [java.io] Use @requires tag instead of exiting based on File.separatorChar value

2025-04-24 Thread Naoto Sato
On Thu, 24 Apr 2025 16:55:16 GMT, Brian Burkhalter wrote: >> test/jdk/java/io/pathNames/win32/SJIS.java line 51: >> >>> 49:that use the SJIS encoding */ >>> 50: String enc = System.getProperty("file.encoding"); >>> 51: if ((enc == null) || !enc.equals("SJIS")) return;

Integrated: 8354424: java/util/logging/LoggingDeadlock5.java fails intermittently in tier6

2025-04-24 Thread David Beaumont
On Wed, 16 Apr 2025 12:12:14 GMT, David Beaumont wrote: > Increasing timeout for deadlock detection and adjusting for the timeout > factor in higher tiers. This pull request has now been integrated. Changeset: e01e33d1 Author:David Beaumont Committer: Daniel Fuchs URL: https://git

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v13]

2025-04-24 Thread Vladimir Ivanov
On Thu, 24 Apr 2025 18:57:11 GMT, Jatin Bhateja wrote: >> Vladimir Ivanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> CPUFeatures: RISC-V support > > src/hotspot/share/opto/vectorIntrinsics.cpp line 563: > >> 561: debug_name =

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v14]

2025-04-24 Thread Vladimir Ivanov
> Migrate Vector API math library (SVML and SLEEF) linkage from native code (in > JVM) to Java FFM API. > > Since FFM API doesn't support vector calling conventions yet, migration > affects only symbol lookup for now. But it still enables significant > simplifications on JVM side. > > The patc

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v12]

2025-04-24 Thread Vladimir Ivanov
On Thu, 24 Apr 2025 11:33:43 GMT, Hamlin Li wrote: >> FTR both `VectorSupport.getMaxLaneCount()` and `CPUFeatures` don't rely on >> raw list of ISA extensions CPU supports, but only those reported by the JVM. >> So, if some feature support is disabled on JVM side, it won't be reported by >> `

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

2025-04-24 Thread Per Minborg
On Thu, 24 Apr 2025 00:05:04 GMT, Chen Liang wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Replace 'contents' with 'result' in the docs > > src/java.base/share/classes/java/util/Collection.java line 61: > >> 59:

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

2025-04-24 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 370 commits: - Revert unwanted changes - Merge branch 'master' into implement-jep502 - Address comments - Repla

Re: RFR: 8077587: BigInteger Roots [v28]

2025-04-24 Thread fabioromano1
> This PR implements nth root computation for `BigInteger`s using Newton method > and optimizes `BigInteger.pow(int)` method. > [Here is a proof of convergence of the recurrence > used.](https://github.com/user-attachments/files/19785045/nth_root_newton_proof_integers.pdf) fabioromano1 has updat

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

2025-04-24 Thread Viktor Klang
On Thu, 24 Apr 2025 09:21:03 GMT, Per Minborg wrote: >> 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 370 commits: > > - Revert unwanted changes > - Mer

Re: RFR: 8354242: VectorAPI: combine vector not operation with compare [v2]

2025-04-24 Thread Andrew Haley
On Fri, 18 Apr 2025 01:36:10 GMT, erifan wrote: >> This patch optimizes the following patterns: >> For integer types: >> >> (XorV (VectorMaskCmp src1 src2 cond) (Replicate -1)) >> => (VectorMaskCmp src1 src2 ncond) >> (XorVMask (VectorMaskCmp src1 src2 cond) (MaskAll m1)) >> => (VectorMa

Re: RFR: 8077587: BigInteger Roots [v29]

2025-04-24 Thread fabioromano1
> This PR implements nth root computation for `BigInteger`s using Newton method > and optimizes `BigInteger.pow(int)` method. > [Here is a proof of convergence of the recurrence > used.](https://github.com/user-attachments/files/19785045/nth_root_newton_proof_integers.pdf) fabioromano1 has updat

RFR: 8355475: UNCTest should use an existing UNC path

2025-04-24 Thread Eirik Bjørsnøs
Please review this test-only PR which updates `UNCTest.java` to use a UNC path which is known to exist. The test currently uses the file URL `file://jdk/LOCAL-JAVA/jdk1.4/win/README.txt`, but since this is unlikely to resolve to an existing UNC path on any CI server, the test doesn't really ve

Re: RFR: 8354242: VectorAPI: combine vector not operation with compare [v2]

2025-04-24 Thread erifan
On Wed, 23 Apr 2025 12:09:51 GMT, Jatin Bhateja wrote: >> erifan 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 two additional commits since >>

Re: RFR: 8354242: VectorAPI: combine vector not operation with compare [v2]

2025-04-24 Thread erifan
On Fri, 18 Apr 2025 01:36:10 GMT, erifan wrote: >> This patch optimizes the following patterns: >> For integer types: >> >> (XorV (VectorMaskCmp src1 src2 cond) (Replicate -1)) >> => (VectorMaskCmp src1 src2 ncond) >> (XorVMask (VectorMaskCmp src1 src2 cond) (MaskAll m1)) >> => (VectorMa

Re: RFR: 8355443: [java.io] Use @requires tag instead of exiting based on File.separatorChar value

2025-04-24 Thread Volkan Yazici
On Thu, 24 Apr 2025 00:33:20 GMT, Brian Burkhalter wrote: > For tests of the `java.io` package, instead of doing this > > public static void main(String[] args) throws Exception { > if (File.separatorChar != '\') { > /* This test is only valid on win32 systems */ >

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

2025-04-24 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: Make public constuctor private - Changes: - all: https://git.openjdk.org/jdk/pull/23972/files - new: https://g

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

2025-04-24 Thread Per Minborg
On Thu, 24 Apr 2025 09:29:14 GMT, Viktor Klang 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 370 commits: >> >> - Revert unwanted changes >> - Merge branch 'master' into implement-jep502 >> - Address com

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

2025-04-24 Thread Viktor Klang
On Thu, 24 Apr 2025 10:37:59 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 public constuctor private 👍 - Marked as r

Re: RFR: 8355080: java.base/jdk.internal.foreign.SystemLookup.find() doesn't work on static JDK [v3]

2025-04-24 Thread Jiangli Zhou
On Tue, 22 Apr 2025 21:32:48 GMT, Chen Liang wrote: >> Jiangli Zhou has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Merge branch 'JDK-8355080' of ssh://github.com/jianglizhou/jdk into >> JDK-8355080 >> - Address henryjen@ comment: >>

Re: RFR: 8355443: [java.io] Use @requires tag instead of exiting based on File.separatorChar value

2025-04-24 Thread Naoto Sato
On Thu, 24 Apr 2025 17:20:01 GMT, Brian Burkhalter wrote: >> IIUC, the test tries to create double byte path directory, so in recent jdk >> it should check `sun.jnu.encoding==MS932` (it still only run on Japanese >> Windows though) > > Sounds like a different issue needs to be filed. Yeah, tha

Re: RFR: 8355301: Simplify Throwable::printStackTrace by replacing inner class with static method [v5]

2025-04-24 Thread Shaojin Wen
> The current Throwable::printStackTrace implementation uses three inner > classes PrintStreamOrWriter/WrappedPrintStream/WrappedPrintWriter. We can > introduce a static method println to replace these three embedded classes. Shaojin Wen has updated the pull request incrementally with one additi

Re: RFR: 8355080: java.base/jdk.internal.foreign.SystemLookup.find() doesn't work on static JDK [v3]

2025-04-24 Thread Chen Liang
On Thu, 24 Apr 2025 17:33:19 GMT, Jiangli Zhou wrote: >> src/java.base/share/classes/jdk/internal/foreign/SystemLookup.java line 135: >> >>> 133: @SuppressWarnings("restricted") >>> 134: private static SymbolLookup sysLookup() { >>> 135: NativeLibraries libs = NativeLibraries.new

Re: RFR: 8355080: java.base/jdk.internal.foreign.SystemLookup.find() doesn't work on static JDK [v3]

2025-04-24 Thread Jiangli Zhou
On Thu, 24 Apr 2025 15:14:27 GMT, Henry Jen wrote: >> Jiangli Zhou has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Merge branch 'JDK-8355080' of ssh://github.com/jianglizhou/jdk into >> JDK-8355080 >> - Address henryjen@ comment: >>

RFR: 8355524: Only every second line in upgradeable files is being used

2025-04-24 Thread Severin Gehwolf
Please review this fix to [JDK-8353185](https://bugs.openjdk.org/browse/JDK-8353185). The reading logic for the config file would erroneously use `scanner.nextLine()` when the current line to be added is in `line`. `line` is not being added, but `scanner.nextLine()` unintentionally skipping lin

Re: RFR: 8355524: Only every second line in upgradeable files is being used

2025-04-24 Thread Aleksey Shipilev
On Thu, 24 Apr 2025 17:31:50 GMT, Severin Gehwolf wrote: > Please review this fix to > [JDK-8353185](https://bugs.openjdk.org/browse/JDK-8353185). The reading logic > for the config file would erroneously use `scanner.nextLine()` when the > current line to be added is in `line`. `line` is not

Re: RFR: 8355443: [java.io] Use @requires tag instead of exiting based on File.separatorChar value

2025-04-24 Thread Brian Burkhalter
On Thu, 24 Apr 2025 16:41:27 GMT, Naoto Sato wrote: >> For tests of the `java.io` package, instead of doing this >> >> public static void main(String[] args) throws Exception { >> if (File.separatorChar != '\') { >> /* This test is only valid on win32 systems */ >>

Re: RFR: 8354424: java/util/logging/LoggingDeadlock5.java fails intermittently in tier6 [v2]

2025-04-24 Thread Daniel Fuchs
On Wed, 16 Apr 2025 17:37:07 GMT, David Beaumont wrote: >> Increasing timeout for deadlock detection and adjusting for the timeout >> factor in higher tiers. > > David Beaumont has updated the pull request incrementally with one additional > commit since the last revision: > > Removing test

Re: RFR: [java.io] Use @requires tag instead of exiting based on "os.name" property value

2025-04-24 Thread Lance Andersen
On Thu, 24 Apr 2025 20:46:42 GMT, Brian Burkhalter wrote: > Use the `@requires` tag instead of obtaining the operating system name from > the `os.name` property and then exiting if the test is not run on that > operating system. Marked as reviewed by lancea (Reviewer). - PR Revie

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache

2025-04-24 Thread Chen Liang
On Thu, 24 Apr 2025 21:09:10 GMT, Ioi Lam wrote: >> I'm not sure what you are proposing. But enqueue is used to ensure that >> inactive references are pruned from the data structure so that dumping only >> includes active references. This way, the JVM that loads these objects >> create these r

Re: RFR: 8349910: Implement HTTP/3 for the HTTP Client API [v2]

2025-04-24 Thread Jaikiran Pai
On Wed, 23 Apr 2025 07:54:39 GMT, Jaikiran Pai wrote: >> src/java.base/share/classes/sun/security/ssl/X509KeyManagerImpl.java line >> 366: >> >>> 364: } >>> 365: >>> 366: public String chooseServerAlias(String keyType, >> >> This method should have default (package-private) access mod

Re: RFR: 8351623: VectorAPI: Refactor subword gather load and add SVE implementation

2025-04-24 Thread Xiaohong Gong
On Wed, 16 Apr 2025 08:58:34 GMT, Xiaohong Gong wrote: > ### Summary: > [JDK-8318650](http://java-service.client.nvidia.com/?q=8318650) added the > hotspot intrinsifying of subword gather load APIs for X86 platforms [1]. This > patch aims at implementing the equivalent functionality for AArch64

Withdrawn: 8351623: VectorAPI: Refactor subword gather load and add SVE implementation

2025-04-24 Thread Xiaohong Gong
On Wed, 16 Apr 2025 08:58:34 GMT, Xiaohong Gong wrote: > ### Summary: > [JDK-8318650](http://java-service.client.nvidia.com/?q=8318650) added the > hotspot intrinsifying of subword gather load APIs for X86 platforms [1]. This > patch aims at implementing the equivalent functionality for AArch64

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache [v3]

2025-04-24 Thread Ioi Lam
> This PR contains 2 parts > > - Upstream of Soft/Weak Reference support authored by @macarte from [the > Leyden > repo](https://github.com/openjdk/leyden/commit/4ca75d156519596e23abc8a312496b7c2f0e0ca5) > - New C++ class `AOTReferenceObjSupport` and new Java method > `ReferencedKeyMap::prepare

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

2025-04-24 Thread Alan Bateman
On Thu, 24 Apr 2025 10:37:59 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 public constuctor private src/java.base/share/classes/j

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v14]

2025-04-24 Thread Vladimir Ivanov
On Fri, 25 Apr 2025 00:06:28 GMT, Fei Yang wrote: >> Vladimir Ivanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Improve comments > > src/hotspot/cpu/riscv/riscv.ad line 1947: > >> 1945: // Vector calling convention not yet implemen

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache [v4]

2025-04-24 Thread Ioi Lam
> This PR contains 2 parts > > - Upstream of Soft/Weak Reference support authored by @macarte from [the > Leyden > repo](https://github.com/openjdk/leyden/commit/4ca75d156519596e23abc8a312496b7c2f0e0ca5) > - New C++ class `AOTReferenceObjSupport` and new Java method > `ReferencedKeyMap::prepare

Re: RFR: 8352003: Support --add-opens with -XX:+AOTClassLinking [v7]

2025-04-24 Thread Alan Bateman
On Fri, 25 Apr 2025 04:23:12 GMT, Calvin Cheung wrote: >> This RFE allows --add-opens to be specified for AOT cache creation. AOT >> cache can be used during production run with --add-opens option as long as >> the same set of options is used during assembly phase. >> >> Passed tiers 1 - 4 tes

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache

2025-04-24 Thread Ioi Lam
On Thu, 24 Apr 2025 21:01:11 GMT, Erik Österlund wrote: >> src/java.base/share/classes/jdk/internal/util/ReferencedKeyMap.java line 355: >> >>> 353: if (referent == null) { >>> 354: // We don't need this key anymore. Add to stale queue >>> 355: ((Refer

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache

2025-04-24 Thread Erik Österlund
On Thu, 24 Apr 2025 19:52:25 GMT, Chen Liang wrote: >> This PR contains 2 parts >> >> - Upstream of Soft/Weak Reference support authored by @macarte from [the >> Leyden >> repo](https://github.com/openjdk/leyden/commit/4ca75d156519596e23abc8a312496b7c2f0e0ca5) >> - New C++ class `AOTReferenceO

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache

2025-04-24 Thread Erik Österlund
On Fri, 18 Apr 2025 18:31:05 GMT, Ioi Lam wrote: > This PR contains 2 parts > > - Upstream of Soft/Weak Reference support authored by @macarte from [the > Leyden > repo](https://github.com/openjdk/leyden/commit/4ca75d156519596e23abc8a312496b7c2f0e0ca5) > - New C++ class `AOTReferenceObjSupport

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

2025-04-24 Thread Luca Kellermann
On Thu, 24 Apr 2025 10:37:59 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 public constuctor private src/java.base/share/classes/j

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

2025-04-24 Thread Luca Kellermann
On Tue, 22 Apr 2025 11:22:52 GMT, Per Minborg wrote: >> src/java.base/share/classes/java/util/ImmutableCollections.java line 1592: >> >>> 1590: final K k = inner.getKey(); >>> 1591: return new NullableKeyValueHolder<>(k, >>> inner.getValue().orElseSet(new

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v15]

2025-04-24 Thread Vladimir Ivanov
> Migrate Vector API math library (SVML and SLEEF) linkage from native code (in > JVM) to Java FFM API. > > Since FFM API doesn't support vector calling conventions yet, migration > affects only symbol lookup for now. But it still enables significant > simplifications on JVM side. > > The patc

Re: RFR: 8355524: Only every second line in upgradeable files is being used

2025-04-24 Thread Alan Bateman
On Thu, 24 Apr 2025 17:31:50 GMT, Severin Gehwolf wrote: > Please review this fix to > [JDK-8353185](https://bugs.openjdk.org/browse/JDK-8353185). The reading logic > for the config file would erroneously use `scanner.nextLine()` when the > current line to be added is in `line`. `line` is not

Re: RFR: 8352003: Support --add-opens with -XX:+AOTClassLinking [v7]

2025-04-24 Thread Calvin Cheung
> This RFE allows --add-opens to be specified for AOT cache creation. AOT cache > can be used during production run with --add-opens option as long as the same > set of options is used during assembly phase. > > Passed tiers 1 - 4 testing. Calvin Cheung has updated the pull request incrementall

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache [v2]

2025-04-24 Thread Ioi Lam
> This PR contains 2 parts > > - Upstream of Soft/Weak Reference support authored by @macarte from [the > Leyden > repo](https://github.com/openjdk/leyden/commit/4ca75d156519596e23abc8a312496b7c2f0e0ca5) > - New C++ class `AOTReferenceObjSupport` and new Java method > `ReferencedKeyMap::prepare

Re: RFR: 8352003: Support --add-opens with -XX:+AOTClassLinking [v7]

2025-04-24 Thread Ioi Lam
On Fri, 25 Apr 2025 04:23:12 GMT, Calvin Cheung wrote: >> This RFE allows --add-opens to be specified for AOT cache creation. AOT >> cache can be used during production run with --add-opens option as long as >> the same set of options is used during assembly phase. >> >> Passed tiers 1 - 4 tes

Re: RFR: 8077587: BigInteger Roots [v19]

2025-04-24 Thread Raffaello Giulietti
On Mon, 21 Apr 2025 11:47:30 GMT, fabioromano1 wrote: >>> [Here is a proof of convergence of the recurrence >>> used.](https://github.com/user-attachments/files/19785045/nth_root_newton_proof_integers.pdf) >> >> That's very nice. It would be even nicer if this was a permalink into the >> JDK r

Re: RFR: 8347471: Provide valid flags and mask in AccessFlag.Location [v6]

2025-04-24 Thread Chen Liang
> Some AccessFlag parsing methods throw IAE because a flag mask is not valid in > a location. However, there is no easy way to check what flag mask bits or > what flags are valid for a location. We need such APIs to check, specific to > each class file format version. > > Also in the investigat

Re: RFR: 8349910: Implement HTTP/3 for the HTTP Client API [v2]

2025-04-24 Thread Daniel Fuchs
> Hi, > > Please find here a PR for the implementation of JEP [JDK-8291976: HTTP/3 for > the HTTP Client API](https://bugs.openjdk.org/browse/JDK-8291976). > > The CSR can be viewed at [JDK-8350588: Implement HTTP/3 for the HTTP Client > API](https://bugs.openjdk.org/browse/JDK-8350588) > > Th

Re: RFR: 8354424: java/util/logging/LoggingDeadlock5.java fails intermittently in tier6 [v2]

2025-04-24 Thread Stuart Marks
On Tue, 22 Apr 2025 13:53:14 GMT, Daniel Fuchs wrote: >> test/jdk/java/util/logging/LoggingDeadlock5.java line 127: >> >>> 125: // in higher tiers, so it's necessary to be a bit pessimistic >>> here. >>> 126: private final static Duration JOIN_WAIT = >>> 127: Dur

RFR: 8354897: Support Soft/Weak Reference in AOT cache

2025-04-24 Thread Ioi Lam
This PR contains 2 parts - Upstream of Soft/Weak Reference support authored by @macarte from [the Leyden repo](https://github.com/openjdk/leyden/commit/4ca75d156519596e23abc8a312496b7c2f0e0ca5) - New C++ class `AOTReferenceObjSupport` and new Java method `ReferencedKeyMap::prepareForAOTCache()`

Re: RFR: 8354897: Support Soft/Weak Reference in AOT cache

2025-04-24 Thread Chen Liang
On Fri, 18 Apr 2025 18:31:05 GMT, Ioi Lam wrote: > This PR contains 2 parts > > - Upstream of Soft/Weak Reference support authored by @macarte from [the > Leyden > repo](https://github.com/openjdk/leyden/commit/4ca75d156519596e23abc8a312496b7c2f0e0ca5) > - New C++ class `AOTReferenceObjSupport

Re: RFR: 8355301: Simplify Throwable::printStackTrace by replacing inner class with static method [v4]

2025-04-24 Thread Shaojin Wen
On Wed, 23 Apr 2025 09:05:07 GMT, Alan Bateman wrote: >>> Ugh, hopefully this will be replaced in the next iteration. >> >> What should we replace it with? Do you have any suggestions? > >> What should we replace it with? Do you have any suggestions? > > The wrapper classes were needed when the

Re: RFR: 8355177: Speed up StringBuilder::append(char[]) via UTF16::compress & Unsafe::copyMemory [v3]

2025-04-24 Thread Shaojin Wen
> In BufferedReader.readLine and other similar scenarios, we need to use > StringBuilder.append(char[]) to build the string. > > For these scenarios, we can use the intrinsic method StringUTF16.compress and > Unsafe.copyMemory instead of the character copy of the char-by-char loop to > improve

Re: RFR: 8355301: Simplify Throwable::printStackTrace by replacing inner class with static method [v4]

2025-04-24 Thread Joe Darcy
On Thu, 24 Apr 2025 23:52:09 GMT, Shaojin Wen wrote: >>> What should we replace it with? Do you have any suggestions? >> >> The wrapper classes were needed when there were was a mix of synchronized >> and j.u.concurrent locks in use. With JEP 491 integrated it meant that the >> java.io classes

Re: RFR: 8355301: Simplify Throwable::printStackTrace by replacing inner class with static method [v4]

2025-04-24 Thread Shaojin Wen
On Thu, 24 Apr 2025 23:57:56 GMT, Joe Darcy wrote: >> @AlanBateman I have modified it to use interface + record. Is this what you >> want? > > Again, what goal is this PR trying to accomplish? The goal of this PR is to simplify the code by using new language features. - PR Review

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v14]

2025-04-24 Thread Fei Yang
On Thu, 24 Apr 2025 23:29:28 GMT, Vladimir Ivanov wrote: >> Migrate Vector API math library (SVML and SLEEF) linkage from native code >> (in JVM) to Java FFM API. >> >> Since FFM API doesn't support vector calling conventions yet, migration >> affects only symbol lookup for now. But it still e

Re: RFR: 8355301: Simplify Throwable::printStackTrace by replacing inner class with static method [v4]

2025-04-24 Thread Joe Darcy
On Fri, 25 Apr 2025 00:34:39 GMT, Shaojin Wen wrote: >> Again, what goal is this PR trying to accomplish? > > The goal of this PR is to simplify the code by using new language features. To what end? - "I was reading Throwable and noticed this possible refactoring." - "I've run an analysis of th

Re: RFR: 8355301: Simplify Throwable::printStackTrace by replacing inner class with static method [v4]

2025-04-24 Thread Chen Liang
On Fri, 25 Apr 2025 00:52:01 GMT, Joe Darcy wrote: >> The goal of this PR is to simplify the code by using new language features. > > To what end? > > - "I was reading Throwable and noticed this possible refactoring." > - "I've run an analysis of the JDK code base and this is the first of N > p

Re: RFR: 8347408: Create an internal method handle adapter for system calls with errno [v3]

2025-04-24 Thread Chen Liang
On Thu, 13 Mar 2025 15:21:33 GMT, Per Minborg wrote: >> As we advance, converting older JDK code to use the relatively new FFM API >> requires system calls that can provide `errno` and the likes to explicitly >> allocate a `MemorySegment` to capture potential error states. This can lead >> to

RFR: 8355444: [java.io] Use @requires tag instead of exiting based on os.name property value

2025-04-24 Thread Brian Burkhalter
Use the `@requires` tag instead of obtaining the operating system name from the `os.name` property and then exiting if the test is not run on that operating system. - Commit messages: - 8355444: [java.io] Use @requires tag instead of exiting based on os.name property value Change

Re: RFR: 8077587: BigInteger Roots [v19]

2025-04-24 Thread fabioromano1
On Thu, 24 Apr 2025 18:17:38 GMT, Raffaello Giulietti wrote: > * Performance enhancements in `pow()`, which is of general interest and does > not require submitting a [CSR](https://wiki.openjdk.org/display/csr/Main). @rgiulietti Yes, but here, the primary enhancement in `pow()` is not concerne

Re: RFR: 8350703: Add standard system property stdin.encoding [v3]

2025-04-24 Thread Naoto Sato
On Wed, 23 Apr 2025 18:02:56 GMT, Stuart Marks wrote: >> * Windows and Unix: set sprops.stdin_encoding if connected to a console >> * Add specs for stdin.encoding >> * Adjust specs to change "undefined" to "unspecified" >> * Rewrite System.in spec to refer to new property and to clarify usage wit

Re: RFR: 8354424: java/util/logging/LoggingDeadlock5.java fails intermittently in tier6 [v2]

2025-04-24 Thread Stuart Marks
On Wed, 16 Apr 2025 17:37:07 GMT, David Beaumont wrote: >> Increasing timeout for deadlock detection and adjusting for the timeout >> factor in higher tiers. > > David Beaumont has updated the pull request incrementally with one additional > commit since the last revision: > > Removing test

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

2025-04-24 Thread Stuart Marks
On Tue, 22 Apr 2025 18:56:40 GMT, Stuart Marks wrote: >> src/java.base/share/classes/java/lang/IO.java line 41: >> >>> 39: * The {@link #readln()} and {@link #readln(String)} methods decode >>> bytes read from >>> 40: * {@code System.in} into characters. The charset used for decoding is >>>

Re: RFR: 8355301: Simplify Throwable::printStackTrace by using record [v4]

2025-04-24 Thread Shaojin Wen
On Fri, 25 Apr 2025 00:53:35 GMT, Chen Liang wrote: >> To what end? >> >> - "I was reading Throwable and noticed this possible refactoring." >> - "I've run an analysis of the JDK code base and this is the first of N >> patches to move to using private records." >> - "With this change, metric X