Re: RFR: 8355442: Reference field lambda forms with type casts are not generated [v2]

2025-04-29 Thread Chen Liang
On Sat, 26 Apr 2025 23:47:01 GMT, Chen Liang wrote: >> Currently, we are not generating all possible field lambda forms. >> >> Field lambda forms have these dimensions: >> - get/set >> - instance/static/static+class init barrier >> - plain/volatile >> - 8 primitive types, no-cast object, object

Integrated: 8355651: Issues with post-image hook

2025-04-29 Thread Alexey Semenyuk
On Sat, 26 Apr 2025 21:31:35 GMT, Alexey Semenyuk wrote: > - Add missing "post-image" infrastructure on Linux. > - Fix "post-image" infrastructure on macOS and Windows. > - Add relevant tests. > - Update TKit to support new tests. This pull request has now been integrated. Changeset: 1a9a928

RFR: 8355391: Use Long::hashCode in java.time

2025-04-29 Thread Volkan Yazici
Replace manual bitwise operations in `hashCode` implementations of `java.time` with `Long::hashCode`. - Commit messages: - Use `Long::hashCode` Changes: https://git.openjdk.org/jdk/pull/24959/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24959&range=00 Issue: https://b

Re: RFR: 8354996: Reduce dynamic code generation for a single downcall [v3]

2025-04-29 Thread Chen Liang
On Mon, 28 Apr 2025 14:36:33 GMT, Chen Liang wrote: >> Perf numbers for simple main: >> Linking of `Class::forName0` down from ~152 to ~83 >> >> For calling little color management system >> https://bugs.openjdk.org/browse/JDK-8313344: >> JNI: ~45 >> baseline panama: ~164 >> patch: ~103 >> >>

Re: RFR: 8342886: Update MET timezone in TimeZoneNames files [v5]

2025-04-29 Thread duke
On Tue, 29 Apr 2025 18:11:05 GMT, Gautham Krishnan wrote: >> MET timezone entry in TimeZoneNames.java and TimeZoneNames_*.java needs to >> be updated as MET is alias to Europe/Brussels as per 2024b tzdata changes. >> >> Also Bug4848242.java needs to be removed as the test expects all euro local

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

2025-04-29 Thread Zhengyu Gu
On Wed, 30 Apr 2025 00:57:51 GMT, Ioi Lam wrote: >> src/hotspot/share/cds/aotReferenceObjSupport.cpp line 122: >> >>> 120: ik->initialize(CHECK); >>> 121: >>> 122: TempNewSymbol field_name = SymbolTable::new_symbol("N""ULL"); >> >> Why "N""ULL", not "NULL"? > > That's because a stand-lone

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

2025-04-29 Thread Kim Barrett
On Tue, 29 Apr 2025 22:46:22 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: 8353686: Optimize Math.cbrt for x86 64 bit platforms

2025-04-29 Thread Mohamed Issa
On Sat, 26 Apr 2025 11:01:58 GMT, Andrew Haley wrote: > > the built in **cbrt** micro-benchmark > > How should we run that benchmark? Thanks. `make test TEST="micro:MathBench.cbrt"` - PR Comment: https://git.openjdk.org/jdk/pull/24470#issuecomment-2840442518

Re: RFR: 8353686: Optimize Math.cbrt for x86 64 bit platforms

2025-04-29 Thread Mohamed Issa
On Sat, 26 Apr 2025 10:04:38 GMT, Andrew Haley wrote: > What are the monotonicity and accuracy results for this approximation? Is it > correctly rounded or faithfully rounded? 1. It's monotonic. 2. It has a maximum error of 0.5213 ULP. 3. It's not correctly rounded but it is faithfully rounded.

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

2025-04-29 Thread John R Rose
On Tue, 29 Apr 2025 19:03:08 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: 8354897: Support Soft/Weak Reference in AOT cache [v7]

2025-04-29 Thread Zhengyu Gu
On Tue, 29 Apr 2025 22:22: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 `AOTReferenceObjS

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

2025-04-29 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

Withdrawn: 8344332: (bf) Migrate DirectByteBuffer to use java.lang.ref.Cleaner

2025-04-29 Thread duke
On Fri, 15 Nov 2024 20:54:56 GMT, Aleksey Shipilev wrote: > DirectByteBuffers are still using old `jdk.internal.ref.Cleaner` > implementation. That implementation carries a doubly-linked list, and so > makes DBB suffer from the same issue fixed for generic > `java.lang.ref.Cleaner` users with

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

2025-04-29 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 `

Re: RFR: 8355651: Issues with post-image hook [v2]

2025-04-29 Thread Alexander Matveev
On Tue, 29 Apr 2025 13:40:59 GMT, Alexey Semenyuk wrote: >> - Add missing "post-image" infrastructure on Linux. >> - Fix "post-image" infrastructure on macOS and Windows. >> - Add relevant tests. >> - Update TKit to support new tests. > > Alexey Semenyuk has refreshed the contents of this pull

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

2025-04-29 Thread erifan
On Tue, 29 Apr 2025 10:22:22 GMT, Emanuel Peter wrote: > Yes, this discussion is down to `requires` vs `applyIf`. This is my argument > for `applyIf`, quoted from above, I have not yet seen an argument against it: > > > If you use @require, then the person does not realize there is a test AND

Re: RFR: 8354996: Reduce dynamic code generation for a single downcall [v3]

2025-04-29 Thread SendaoYan
On Mon, 28 Apr 2025 14:36:33 GMT, Chen Liang wrote: >> Perf numbers for simple main: >> Linking of `Class::forName0` down from ~152 to ~83 >> >> For calling little color management system >> https://bugs.openjdk.org/browse/JDK-8313344: >> JNI: ~45 >> baseline panama: ~164 >> patch: ~103 >> >>

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

2025-04-29 Thread Chen Liang
On Tue, 29 Apr 2025 19:17:02 GMT, Chen Liang wrote: >> 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 >> e

Integrated: 8347471: Provide valid flags and mask in AccessFlag.Location

2025-04-29 Thread Chen Liang
On Tue, 14 Jan 2025 07:38:30 GMT, Chen Liang wrote: > 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

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

2025-04-29 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: 8354897: Support Soft/Weak Reference in AOT cache [v7]

2025-04-29 Thread Ioi Lam
On Wed, 30 Apr 2025 00:28:40 GMT, Zhengyu Gu wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @fisk comment -- use proper HeapAccess to load referent; Also refactor >> AOTReferenceObjSupport::is_enabled() > > src/hotspo

Re: RFR: 8355651: Issues with post-image hook [v2]

2025-04-29 Thread Alexey Semenyuk
On Tue, 29 Apr 2025 13:40:59 GMT, Alexey Semenyuk wrote: >> - Add missing "post-image" infrastructure on Linux. >> - Fix "post-image" infrastructure on macOS and Windows. >> - Add relevant tests. >> - Update TKit to support new tests. > > Alexey Semenyuk has refreshed the contents of this pull

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

2025-04-29 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: 8355689: Wrong native entry name for FloatMaxVector vector math stubs with -XX:MaxVectorSize=8

2025-04-29 Thread Vladimir Ivanov
On Mon, 28 Apr 2025 19:41:28 GMT, Vladimir Ivanov wrote: > Both SVML and SLEEF libraries reuse 128-bit versions for vector of 2 floats. > Usually, only `Float64Vector` shape satisfies that condiditon, but > with`-XX:MaxVectorSize=8` `FloatMaxVector` becomes 2 element vector as well. > > Adjus

Re: RFR: 8355689: Wrong native entry name for FloatMaxVector vector math stubs with -XX:MaxVectorSize=8

2025-04-29 Thread Vladimir Ivanov
On Mon, 28 Apr 2025 19:41:28 GMT, Vladimir Ivanov wrote: > Both SVML and SLEEF libraries reuse 128-bit versions for vector of 2 floats. > Usually, only `Float64Vector` shape satisfies that condiditon, but > with`-XX:MaxVectorSize=8` `FloatMaxVector` becomes 2 element vector as well. > > Adjus

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

2025-04-29 Thread Alan Bateman
On Tue, 29 Apr 2025 18:27:45 GMT, Brian Burkhalter wrote: >> Perhaps the `@requires` tag is no longer needed. Without it, this test >> passed 30 repeats in the CI on both Intel and ARM Linux nodes. > > Comment simplified in 4cee3c2. Okay, just a bit puzzled as to why it doesn't run on Linux. Th

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

2025-04-29 Thread Per Minborg
On Tue, 29 Apr 2025 14:51:08 GMT, Jorn Vernee wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Make public constuctor private > > test/jdk/java/lang/StableValue/StableFunctionTest.java line 79: > >> 77: void fac

Integrated: 8355442: Reference field lambda forms with type casts are not generated

2025-04-29 Thread Chen Liang
On Fri, 25 Apr 2025 20:30:15 GMT, Chen Liang wrote: > Currently, we are not generating all possible field lambda forms. > > Field lambda forms have these dimensions: > - get/set > - instance/static/static+class init barrier > - plain/volatile > - 8 primitive types, no-cast object, object with ca

Re: RFR: 8355442: Reference field lambda forms with type casts are not generated [v2]

2025-04-29 Thread Jorn Vernee
On Sat, 26 Apr 2025 23:47:01 GMT, Chen Liang wrote: >> Currently, we are not generating all possible field lambda forms. >> >> Field lambda forms have these dimensions: >> - get/set >> - instance/static/static+class init barrier >> - plain/volatile >> - 8 primitive types, no-cast object, object

Re: RFR: 8347814: Make all imports consistent in the FFM API tests and benchmarks

2025-04-29 Thread Per Minborg
On Wed, 19 Feb 2025 09:22:09 GMT, Per Minborg wrote: > This PR proposes to make all imports consistent in the FFM API tests and > benchmarks. > > This is a follow-up PR from https://github.com/openjdk/jdk/pull/22827 > > Passes tier1-3 In the end, this didn't make the bar in terms of cost/bene

Re: RFR: 8355720: Implement JEP 506: Scoped Values

2025-04-29 Thread Chen Liang
On Mon, 28 Apr 2025 17:15:34 GMT, ExE Boss wrote: >> Propose to finalize scoped values. >> The only functional change is that the orElse() method no longer accepts a >> null argument. > > src/java.base/share/classes/java/lang/ScopedValue.java line 614: > >> 612: */ >> 613: public T orE

Re: RFR: 8355720: Implement JEP 506: Scoped Values

2025-04-29 Thread ExE Boss
On Mon, 28 Apr 2025 14:32:04 GMT, Andrew Haley wrote: > Propose to finalize scoped values. > The only functional change is that the orElse() method no longer accepts a > null argument. src/java.base/share/classes/java/lang/ScopedValue.java line 614: > 612: */ > 613: public T orElse(T

Re: RFR: 8355720: Implement JEP 506: Scoped Values

2025-04-29 Thread Alan Bateman
On Mon, 28 Apr 2025 14:32:04 GMT, Andrew Haley wrote: > Propose to finalize scoped values. > The only functional change is that the orElse() method no longer accepts a > null argument. @theRealAph There are test updates in the loom repo that will also need to be included in this PR. -

Re: RFR: 8347814: Make all imports consistent in the FFM API tests and benchmarks

2025-04-29 Thread Sergey Bylokhov
On Tue, 29 Apr 2025 07:11:30 GMT, Per Minborg wrote: > In the end, this didn't make the bar in terms of cost/benefit. For example, > backporting might be impacted. The first LTS release to include this API will be 25, correct? It would be best to clean this up in advance, as backporting to ver

Re: RFR: 8355022: Implement JEP 506: Scoped Values [v3]

2025-04-29 Thread Alan Bateman
On Tue, 29 Apr 2025 07:54:23 GMT, Andrew Haley wrote: >> Propose to finalize scoped values. >> The only functional change is that the orElse() method no longer accepts a >> null argument. > > Andrew Haley has updated the pull request incrementally with one additional > commit since the last rev

RFR: 8352926: New test TestDockerMemoryMetricsSubgroup.java fails

2025-04-29 Thread PAWAN CHAWDHARY
8352926: New test TestDockerMemoryMetricsSubgroup.java fails - Commit messages: - update comment - 8352926: New test TestDockerMemoryMetricsSubgroup.java fails Changes: https://git.openjdk.org/jdk/pull/24948/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24948&range=00

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

2025-04-29 Thread Maurizio Cimadamore
On Mon, 28 Apr 2025 13:26:30 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 with a new target base due to a merge > or a rebase. The pull request now contains

Re: RFR: 8355719: Reduce memory consumption of BigInteger.pow() [v42]

2025-04-29 Thread fabioromano1
> This PR optimizes `BigInteger.pow(int)` method. The primary enhancement in > `pow()` is not concerned most on execution time, but rather in memory > optimization, because the PR implementation does the "shift of the exponent" > squaring the result rather than the base, so the base is not squar

Re: RFR: 8342576: [macos] AppContentTest still fails after JDK-8341443 for same reason on older macOS versions

2025-04-29 Thread Oliver Kopp
On Fri, 25 Oct 2024 01:49:01 GMT, Alexander Matveev wrote: > - It is not clear on which macOS versions codesign fails if application > bundle contains additional content. > - As a result test was modified to generate only application image, since PKG > or DMG cannot be generated if signing fai

Re: RFR: 8355719: Reduce memory consumption of BigInteger.pow() [v41]

2025-04-29 Thread fabioromano1
> This PR optimizes `BigInteger.pow(int)` method. The primary enhancement in > `pow()` is not concerned most on execution time, but rather in memory > optimization, because the PR implementation does the "shift of the exponent" > squaring the result rather than the base, so the base is not squar

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

2025-04-29 Thread Dan Heidinga
On Mon, 28 Apr 2025 21:08:10 GMT, Ioi Lam wrote: >> We're creating a set of hooks - right now, there is one in MT - that are >> called by the VM at the appropriate time during the assembly phase to >> massage the class's state before we write the AOTCache out. >> >> Conceptually any class coul

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

2025-04-29 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: 8344708: Compiler Implementation of Module Import Declarations [v8]

2025-04-29 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. - Changes: - all: https://gi

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

2025-04-29 Thread Jan Lahoda
On Tue, 29 Apr 2025 10:23:26 GMT, Maurizio Cimadamore wrote: >> Jan Lahoda has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 13 commits: >> >> - Merge branch 'master' into JDK-8344708 >> - Adjusting ToolProviderTest to the update

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

2025-04-29 Thread Jan Lahoda
On Tue, 29 Apr 2025 10:13:39 GMT, Maurizio Cimadamore wrote: >> src/jdk.jshell/share/classes/jdk/internal/jshell/tool/Startup.java line 345: >> >>> 343: boolean hasModuleImports = source == null || >>> 344: >>> Feature.MODULE_IMPORTS.allowedInSource(s

Re: RFR: 8342576: [macos] AppContentTest still fails after JDK-8341443 for same reason on older macOS versions

2025-04-29 Thread Alexey Semenyuk
On Tue, 29 Apr 2025 11:35:29 GMT, Oliver Kopp wrote: >> - It is not clear on which macOS versions codesign fails if application >> bundle contains additional content. >> - As a result test was modified to generate only application image, since >> PKG or DMG cannot be generated if signing fails.

Re: RFR: 8355719: Reduce memory consumption of BigInteger.pow() [v40]

2025-04-29 Thread fabioromano1
On Mon, 28 Apr 2025 17:06:55 GMT, Raffaello Giulietti wrote: >> fabioromano1 has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Added tests for memory consumption > > Can you show the benchmark results before/after, perhaps specifying the

Re: RFR: 8355651: Issues with post-image hook [v2]

2025-04-29 Thread Hendrik Schick
On Tue, 29 Apr 2025 13:37:06 GMT, Alexey Semenyuk wrote: >> - Add missing "post-image" infrastructure on Linux. >> - Fix "post-image" infrastructure on macOS and Windows. >> - Add relevant tests. >> - Update TKit to support new tests. > > Alexey Semenyuk has refreshed the contents of this pull

Re: RFR: 8355651: Issues with post-image hook [v2]

2025-04-29 Thread Alexey Semenyuk
> - Add missing "post-image" infrastructure on Linux. > - Fix "post-image" infrastructure on macOS and Windows. > - Add relevant tests. > - Update TKit to support new tests. Alexey Semenyuk has refreshed the contents of this pull request, and previous commits have been removed. The incremental

Re: RFR: 8355719: Reduce memory consumption of BigInteger.pow() [v40]

2025-04-29 Thread fabioromano1
On Mon, 28 Apr 2025 17:06:55 GMT, Raffaello Giulietti wrote: > Can you show the benchmark results before/after, perhaps specifying the > characteristics of your machine (CPU make/model, RAM, OS)? CPU: Intel Core i3 7100U @ 2.40GHz RAM: 8,00GB Dual-Channel DDR4 @ 1063MHz OS: Kali Linux 2025.1a-

Re: RFR: 8355632: WhiteBox.waitForReferenceProcessing() fails assert for return type [v2]

2025-04-29 Thread Kim Barrett
On Mon, 28 Apr 2025 19:21:05 GMT, Brent Christian wrote: >> The newly-added `WhiteBox.waitForReferenceProcessing()` (see >> [8305186](https://bugs.openjdk.org/browse/JDK-8305186)) always fails with >> assertions enabled. >> I've updated the assertion, and also added the test I used locally to t

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

2025-04-29 Thread Alan Bateman
On Tue, 29 Apr 2025 06:43:59 GMT, Magnus Ihse Bursie wrote: > Do we have native libraries in the JDK that are not loaded by the boot > loader? There are few, e.g. java.security.jgss, jdk.security.auth and jdk.crypto.cryptoki are mapped to the platform class loader, and jdk.attach mapped to t

Re: RFR: 8355022: Implement JEP 506: Scoped Values [v3]

2025-04-29 Thread Alan Bateman
On Tue, 29 Apr 2025 07:54:23 GMT, Andrew Haley wrote: >> Propose to finalize scoped values. >> The only functional change is that the orElse() method no longer accepts a >> null argument. > > Andrew Haley has updated the pull request incrementally with one additional > commit since the last rev

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

2025-04-29 Thread Per Minborg
On Fri, 25 Apr 2025 09:17:13 GMT, Luca Kellermann wrote: >> `setOrThrow` might be invoked several times. If the first invocation failed >> because the supplier threw and then the second invocation (with the same >> supplier) succeded (because there was some state that changed), we have this >>

RFR: 8355720: Implement JEP 506: Scoped Values

2025-04-29 Thread Andrew Haley
Propose to finalize scoped values. The only functional change is that the orElse() method no longer accepts a null argument. - Commit messages: - 8355720: Implement JEP 506: Scoped Values - Implement JEP 506: Scoped Values Changes: https://git.openjdk.org/jdk/pull/24923/files We

Re: RFR: 8355720: Implement JEP 506: Scoped Values

2025-04-29 Thread Chen Liang
On Mon, 28 Apr 2025 14:32:04 GMT, Andrew Haley wrote: > Propose to finalize scoped values. > The only functional change is that the orElse() method no longer accepts a > null argument. Nit: is the no-arg constructor of `Snapshot` supposed to be `private` instead? - PR Comment: htt

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

2025-04-29 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: 8355022: Implement JEP 506: Scoped Values [v2]

2025-04-29 Thread Andrew Haley
> Propose to finalize scoped values. > The only functional change is that the orElse() method no longer accepts a > null argument. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: ScopedValue::orElse() does not accept null as an argum

Re: RFR: 8355022: Implement JEP 506: Scoped Values [v2]

2025-04-29 Thread Alan Bateman
On Tue, 29 Apr 2025 07:41:28 GMT, Andrew Haley wrote: >> Propose to finalize scoped values. >> The only functional change is that the orElse() method no longer accepts a >> null argument. > > Andrew Haley has updated the pull request incrementally with one additional > commit since the last rev

Re: RFR: 8355022: Implement JEP 506: Scoped Values [v3]

2025-04-29 Thread Andrew Haley
> Propose to finalize scoped values. > The only functional change is that the orElse() method no longer accepts a > null argument. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Since when? - Changes: - all: https://

Runtime.exec and SIGPIPE + SIG_IGN

2025-04-29 Thread Thomas Stüfe
Hi, I would like to gauge opinions on whether the following scenario is a bug to fix or whether to accept it as standard behavior. --- A customer has the following problem: - The JVM invokes a third-party JNI library that sets the signal disposition of SIGPIPE to SIG_IGN (Boo! in this case, it

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

2025-04-29 Thread Maurizio Cimadamore
On Tue, 29 Apr 2025 10:12:07 GMT, Maurizio Cimadamore wrote: >> Jan Lahoda has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 13 commits: >> >> - Merge branch 'master' into JDK-8344708 >> - Adjusting ToolProviderTest to the update

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

2025-04-29 Thread Maurizio Cimadamore
On Mon, 28 Apr 2025 13:26:30 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 with a new target base due to a merge > or a rebase. The pull request now contains

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

2025-04-29 Thread Emanuel Peter
On Fri, 25 Apr 2025 07:24:15 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: 8347471: Provide valid flags and mask in AccessFlag.Location [v10]

2025-04-29 Thread Roger Riggs
On Mon, 28 Apr 2025 22:07:00 GMT, Chen Liang wrote: >> 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 >> e

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

2025-04-29 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: 8347471: Provide valid flags and mask in AccessFlag.Location [v10]

2025-04-29 Thread Chen Liang
On Tue, 29 Apr 2025 18:49:58 GMT, Roger Riggs wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update specs for other existing APIs > > src/java.base/share/classes/java/lang/reflect/AccessFlag.java line 38: > >> 36:

Re: RFR: 8355719: Reduce memory consumption of BigInteger.pow() [v46]

2025-04-29 Thread Johannes Graham
On Tue, 29 Apr 2025 15:10:10 GMT, fabioromano1 wrote: >> This PR optimizes `BigInteger.pow(int)` method. The primary enhancement in >> `pow()` is not concerned most on execution time, but rather in memory >> optimization, because the PR implementation does the "shift of the exponent" >> squari

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

2025-04-29 Thread Chen Liang
On Tue, 29 Apr 2025 19:10:17 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/lang/reflect/AccessFlag.java line 38: >> >>> 36: import java.lang.classfile.attribute.ModuleRequireInfo; >>> 37: import java.lang.module.ModuleDescriptor; >>> 38: import java.util.*; >> >> Wildcard imports a

Re: RFR: 8342576: [macos] AppContentTest still fails after JDK-8341443 for same reason on older macOS versions

2025-04-29 Thread Alexey Semenyuk
On Fri, 25 Oct 2024 01:49:01 GMT, Alexander Matveev wrote: > - It is not clear on which macOS versions codesign fails if application > bundle contains additional content. > - As a result test was modified to generate only application image, since PKG > or DMG cannot be generated if signing fai

Re: RFR: 8342886: Update MET timezone in TimeZoneNames files [v5]

2025-04-29 Thread Naoto Sato
On Tue, 29 Apr 2025 18:11:05 GMT, Gautham Krishnan wrote: >> MET timezone entry in TimeZoneNames.java and TimeZoneNames_*.java needs to >> be updated as MET is alias to Europe/Brussels as per 2024b tzdata changes. >> >> Also Bug4848242.java needs to be removed as the test expects all euro local

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

2025-04-29 Thread Chen Liang
On Tue, 29 Apr 2025 18:40:51 GMT, ExE Boss wrote: >> Hmm, I intentionally avoided implementing spliterator because there are too >> many opportunities to optimize - a fully optimized Spliterator implementaton >> should split an int mask. Can we do that in another patch? I need to check >> if M

Re: RFR: 8342576: [macos] AppContentTest still fails after JDK-8341443 for same reason on older macOS versions

2025-04-29 Thread Christoph
On Fri, 25 Oct 2024 01:49:01 GMT, Alexander Matveev wrote: > - It is not clear on which macOS versions codesign fails if application > bundle contains additional content. > - As a result test was modified to generate only application image, since PKG > or DMG cannot be generated if signing fai

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

2025-04-29 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. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8355444:

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

2025-04-29 Thread ExE Boss
On Sun, 27 Apr 2025 17:29:32 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/lang/reflect/AccessFlag.java line 722: >> >>> 720: } >>> 721: >>> 722: private static final class AccessFlagSet extends >>> AbstractSet { >> >> This should probably also define the spliterator meth

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

2025-04-29 Thread Brian Burkhalter
On Tue, 29 Apr 2025 16:42:26 GMT, Brian Burkhalter wrote: >> test/jdk/java/io/FileOutputStream/ManyFiles.java line 33: >> >>> 31: * Windows capability it is much simpler to only run it >>> 32: * on that platform. >>> 33: * @requires (os.family != "linux") >> >> I think this comment should be

Re: RFR: 8355938: Addressed rare lost unpark bug 8074773 by pre-loading LockSupport.class

2025-04-29 Thread kabutz
On Tue, 29 Apr 2025 17:02:38 GMT, kabutz wrote: > In 2015, Google discovered a rare disastrous classloading bug in first call > to LockSupport.park() that occurred in the AppClassLoader using the Java 7 > ConcurrentHashMap, which used ReentrantLock for the synchronization. > > Since then, the

Re: RFR: 8355938: Addressed rare lost unpark bug 8074773 by pre-loading LockSupport.class

2025-04-29 Thread Alan Bateman
On Tue, 29 Apr 2025 18:32:12 GMT, kabutz wrote: > What is the potential downside of adding the static block to make sure the > class is loaded? LockSupport is part of the standard API, we can't force every usage to preload this class. So if we have to change anything then it would be better to

Re: RFR: 8342576: [macos] AppContentTest still fails after JDK-8341443 for same reason on older macOS versions

2025-04-29 Thread Alexey Semenyuk
On Tue, 29 Apr 2025 18:28:47 GMT, Christoph wrote: > This is unfortunate. However, then how do I add content to the app image > before? You can add custom app content to the app image, but be sure to copy it to the correct location. You can have "Contents/Resources/jabrefHost.py", but you can

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

2025-04-29 Thread Chen Liang
> 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, and update the > remove-from-compute behavior from the o

Re: RFR: 8355938: Addressed rare lost unpark bug 8074773 by pre-loading LockSupport.class

2025-04-29 Thread Chen Liang
On Tue, 29 Apr 2025 17:02:38 GMT, kabutz wrote: > In 2015, Google discovered a rare disastrous classloading bug in first call > to LockSupport.park() that occurred in the AppClassLoader using the Java 7 > ConcurrentHashMap, which used ReentrantLock for the synchronization. > > Since then, the

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

2025-04-29 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: 8297271: AccessFlag.maskToAccessFlags should be specific to class file version [v5]

2025-04-29 Thread Chen Liang
> Take the class file version to reject flags not yet defined, redefined, or > obsoleted. The non-cffv version can return the preview flags when the current > runtime is in preview. Chen Liang has updated the pull request with a new target base due to a merge or a rebase. The pull request now c

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate [v2]

2025-04-29 Thread Henry Jen
On Tue, 29 Apr 2025 00:02:58 GMT, Chen Liang wrote: >> Henry Jen 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 three additional commits >> sin

Re: RFR: 8355719: Reduce memory consumption of BigInteger.pow() [v43]

2025-04-29 Thread fabioromano1
> This PR optimizes `BigInteger.pow(int)` method. The primary enhancement in > `pow()` is not concerned most on execution time, but rather in memory > optimization, because the PR implementation does the "shift of the exponent" > squaring the result rather than the base, so the base is not squar

Re: Runtime.exec and SIGPIPE + SIG_IGN

2025-04-29 Thread Thomas Stüfe
Hi Archie! On Tue, Apr 29, 2025 at 4:17 PM Archie Cobbs wrote: > This reminds me of a bug I saw once decades ago: the JVM was not setting > the close-on-exec flag on new file descriptors, so child processes were > receiving copies of "leaked" file descriptors and keeping them open > indefinitely

Re: RFR: 8342283: CDS cannot handle a large number of classes [v2]

2025-04-29 Thread Ioi Lam
On Mon, 28 Apr 2025 09:20:38 GMT, Aleksey Shipilev wrote: >> CDS cannot handle large number of classes, because `ClassLoader` data >> structures get too large for CDS archival. The new test captures such an >> occasion. We do `clear()`-s, but that is not enough to trim the backing >> storages

Re: RFR: 8349146: [REDO] Implement a better allocator for downcalls

2025-04-29 Thread Jorn Vernee
On Wed, 23 Apr 2025 14:05:58 GMT, Per Minborg wrote: > This PR is based on the work of @mernst-github and aims to implement an > _internal_ thread-local 'stack' allocator, which works like a dynamically > sized arena, but with reset functionality to reset the allocated size back to > a certain

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

2025-04-29 Thread Jorn Vernee
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 Looks mostly good. Left a few

Re: RFR: 8351000: StringBuilder getChar and putChar robustness

2025-04-29 Thread Chen Liang
On Tue, 29 Apr 2025 14:10:30 GMT, Roger Riggs wrote: > Improve StringBuilder getChar and putChar robustness with racy updates to > StringBuilder. > Test racing threads with append, insert, and reading characters. Thanks, other changes look good to me! - Marked as reviewed by liac

Re: RFR: 8343829: Unify decimal and hexadecimal parsing in FloatingDecimal [v5]

2025-04-29 Thread Raffaello Giulietti
On Thu, 9 Jan 2025 10:55:16 GMT, Raffaello Giulietti wrote: >> See the JBS bug for some details. > > Raffaello Giulietti 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

Re: RFR: 8342886: Update MET timezone in TimeZoneNames files [v3]

2025-04-29 Thread Naoto Sato
On Tue, 29 Apr 2025 17:06:30 GMT, Gautham Krishnan wrote: >> MET timezone entry in TimeZoneNames.java and TimeZoneNames_*.java needs to >> be updated as MET is alias to Europe/Brussels as per 2024b tzdata changes. >> >> Also Bug4848242.java needs to be removed as the test expects all euro local

Re: RFR: 8342886: Update MET timezone in TimeZoneNames files [v3]

2025-04-29 Thread Gautham Krishnan
On Tue, 29 Apr 2025 17:36:26 GMT, Naoto Sato wrote: >> Gautham Krishnan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Updating comment in Bug4848242.java > > You'll need to append "8342886" to the `@bug` tag @naotoj updated. Thanks -

Re: RFR: 8342886: Update MET timezone in TimeZoneNames files [v4]

2025-04-29 Thread Gautham Krishnan
> MET timezone entry in TimeZoneNames.java and TimeZoneNames_*.java needs to be > updated as MET is alias to Europe/Brussels as per 2024b tzdata changes. > > Also Bug4848242.java needs to be removed as the test expects all euro locale > time zones should have the same short names. Gautham Krish

Re: RFR: 8351000: StringBuilder getChar and putChar robustness

2025-04-29 Thread Per Minborg
On Tue, 29 Apr 2025 14:10:30 GMT, Roger Riggs wrote: > Improve StringBuilder getChar and putChar robustness with racy updates to > StringBuilder. > Test racing threads with append, insert, and reading characters. LGTM. Thanks for these improvements. - Marked as reviewed by pminbo

Re: RFR: 8297271: AccessFlag.maskToAccessFlags should be specific to class file version [v5]

2025-04-29 Thread Roger Riggs
On Tue, 29 Apr 2025 19:48:01 GMT, Chen Liang wrote: >> Take the class file version to reject flags not yet defined, redefined, or >> obsoleted. The non-cffv version can return the preview flags when the >> current runtime is in preview. > > Chen Liang has updated the pull request with a new tar

Re: RFR: 8349146: [REDO] Implement a better allocator for downcalls

2025-04-29 Thread Per Minborg
On Wed, 23 Apr 2025 14:05:58 GMT, Per Minborg wrote: > This PR is based on the work of @mernst-github and aims to implement an > _internal_ thread-local 'stack' allocator, which works like a dynamically > sized arena, but with reset functionality to reset the allocated size back to > a certain

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

2025-04-29 Thread Roger Riggs
On Tue, 29 Apr 2025 19:17:02 GMT, Chen Liang wrote: >> 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 >> e

Re: RFR: 8297271: AccessFlag.maskToAccessFlags should be specific to class file version [v4]

2025-04-29 Thread Roger Riggs
On Tue, 29 Apr 2025 16:12:01 GMT, Chen Liang wrote: >> Take the class file version to reject flags not yet defined, redefined, or >> obsoleted. The non-cffv version can return the preview flags when the >> current runtime is in preview. > > Chen Liang has updated the pull request with a new tar

Re: RFR: 8297271: AccessFlag.maskToAccessFlags should be specific to class file version [v4]

2025-04-29 Thread Chen Liang
On Tue, 29 Apr 2025 19:41:23 GMT, Roger Riggs wrote: >> Chen Liang has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 10 commits: >> >> - Wording updates >> - Merge branch 'feature/af-location-accessors' into feature/af-cffv-parse

  1   2   >