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: 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

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: 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: 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: 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 >> >>

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: 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: 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

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

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: 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: 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 [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: 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: 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: 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: 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

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 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

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 `

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: 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: 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

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 `

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

2025-04-29 Thread Chen Liang
On Tue, 29 Apr 2025 21:24:11 GMT, Jorn Vernee wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> use var > > src/java.base/share/classes/java/lang/invoke/DirectMethodHandle.java line 626: > >> 624: FT_UNCHE

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: 8355080: java.base/jdk.internal.foreign.SystemLookup.find() doesn't work on static JDK [v3]

2025-04-29 Thread Jiangli Zhou
On Tue, 29 Apr 2025 06:43:59 GMT, Magnus Ihse Bursie 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@ com

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

2025-04-29 Thread Chen Liang
On Tue, 29 Apr 2025 19:06:08 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

RFR: 8355956: Prepare javap for class file format aware access flag parsing

2025-04-29 Thread Chen Liang
A prerequisite to #24760; this was part of it, but was split out to simplify the review of the addition of `maskToAccessFlags(int, Location, CFFV)` by minimizing the changes in javap. That patch will only need to update `BasicWriter` as a result. Testing: langtools/tools/javap, tier 1+2 underwa

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

2025-04-29 Thread Jorn Vernee
On Tue, 29 Apr 2025 19:54:07 GMT, Per Minborg wrote: > maybe we should problem list or exclude macOS testing? Yes, I think we should. The issue is quite intermittent, and last time it only started showing up in CI as well. I think we should move the `stress()` test to a separate file./jtreg te

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

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: 8352926: New test TestDockerMemoryMetricsSubgroup.java fails [v2]

2025-04-29 Thread Sergey Chernyshev
On Tue, 29 Apr 2025 14:45:25 GMT, PAWAN CHAWDHARY wrote: >> 8352926: New test TestDockerMemoryMetricsSubgroup.java fails > > PAWAN CHAWDHARY has updated the pull request incrementally with one > additional commit since the last revision: > > update reference of DockerVersion test/hotspot/jtr

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

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

Integrated: 8355632: WhiteBox.waitForReferenceProcessing() fails assert for return type

2025-04-29 Thread Brent Christian
On Fri, 25 Apr 2025 23:37:13 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 test

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

2025-04-29 Thread Erik Österlund
On Tue, 29 Apr 2025 19:06:08 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: 8297271: AccessFlag.maskToAccessFlags should be specific to class file version [v4]

2025-04-29 Thread Roger Riggs
On Tue, 29 Apr 2025 20:01:23 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/lang/reflect/AccessFlag.java line 401: >> >>> 399: public static Set maskToAccessFlags(int mask, Location >>> location, ClassFileFormatVersion cffv) { >>> 400: var definition = findDefinition(loc

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:59:46 GMT, Chen Liang wrote: > Unfortunately the cffv-aware maskToAccessFlags introduction and old > maskToAccessFlags migration to reject STRICTFP are bundled together - this > means javap will need an ad-hoc facility to parse instead of using these > APIs. Is that the

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

2025-04-29 Thread Chen Liang
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: 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

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: 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: 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: 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 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: 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: 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: 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: 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: 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: 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 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: 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: 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: 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 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: 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: 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: 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: 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: 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: Runtime.exec and SIGPIPE + SIG_IGN

2025-04-29 Thread Roger Riggs
Hi Thomas, Archie, Generally, I would agree that a bit more cleanup/resetting of the signal state makes sense. There is general unease about changing this kind of global state that has been stable for a long time. An application that expects to change operating system state before calling exec

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

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

Integrated: 8342283: CDS cannot handle a large number of classes

2025-04-29 Thread Aleksey Shipilev
On Fri, 25 Apr 2025 14:49:37 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 for

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

2025-04-29 Thread Aleksey Shipilev
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: 8342886: Update MET timezone in TimeZoneNames files [v4]

2025-04-29 Thread Naoto Sato
On Tue, 29 Apr 2025 17:50: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: 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: 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: 8351000: StringBuilder getChar and putChar robustness

2025-04-29 Thread Raffaello Giulietti
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. Looks fine. Thanks @RogerRiggs - Marked as reviewed by rgiulietti (

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 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

Withdrawn: 8341275: Explicit counter support for Code attribute building

2025-04-29 Thread Chen Liang
On Sun, 27 Apr 2025 02:04:30 GMT, Chen Liang wrote: > Internal explicit counter support for Code max_stack and max_locals has been > already added in #24807. Since that example works well, we may consider > opening this functionality up to general users under strict restrictions. > > This is a

Re: RFR: 8341275: Explicit counter support for Code attribute building [v2]

2025-04-29 Thread Chen Liang
On Sun, 27 Apr 2025 03:38:35 GMT, Chen Liang wrote: >> Internal explicit counter support for Code max_stack and max_locals has been >> already added in #24807. Since that example works well, we may consider >> opening this functionality up to general users under strict restrictions. >> >> This

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

2025-04-29 Thread Raffaello Giulietti
On Tue, 29 Apr 2025 17:00:25 GMT, Raffaello Giulietti wrote: >> fabioromano1 has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Adjust the type of operand >> - Use a more loose formula to do range check >> >>Use a more loose for

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

2025-04-29 Thread kabutz
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 recommended fix for this bug seems to be this code snippet i

Re: RFR: 8342886: Update MET timezone in TimeZoneNames files

2025-04-29 Thread Gautham Krishnan
On Fri, 25 Apr 2025 18:12:32 GMT, Naoto Sato 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 locale >>

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

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: 8355719: Reduce memory consumption of BigInteger.pow() [v46]

2025-04-29 Thread Raffaello Giulietti
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: 8345431: Detect duplicate entries in jar files with jar --validate [v4]

2025-04-29 Thread Henry Jen
> This PR check the jar file to ensure entries are consistent from the central > directory and local file header. Also check there is no duplicate entry names > that could override the desired content by accident. Henry Jen has updated the pull request incrementally with one additional commit s

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 05:39:14 GMT, Alan Bateman wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8355444: Add comment tag tp ManyFiles > > test/jdk/java/io/FileOutputStream/ManyFiles.java line 33: > >> 31: * Wi

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

2025-04-29 Thread Naoto Sato
On Tue, 29 Apr 2025 16:15: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: 8342886: Update MET timezone in TimeZoneNames files

2025-04-29 Thread Gautham Krishnan
On Fri, 25 Apr 2025 18:12:32 GMT, Naoto Sato 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 locale >>

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

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

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: 8355719: Reduce memory consumption of BigInteger.pow() [v46]

2025-04-29 Thread fabioromano1
On Tue, 29 Apr 2025 15:42:56 GMT, Raffaello Giulietti wrote: > I don't observe any significant difference on my environment @rgiulietti Although there could be no significant differences, the method to compute powers of `long`s could be useful, since it is used both by `BigInteger.pow()` and

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

2025-04-29 Thread fabioromano1
On Tue, 29 Apr 2025 15:18:35 GMT, Raffaello Giulietti wrote: > What went wrong before? @rgiulietti For some reason, compiling the test with a custom JVM will produce that exception at runtime. It must be compiled with the default JVM, then change the JVM manually and run it with the chosen on

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

2025-04-29 Thread Raffaello Giulietti
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: 8319457: Update jpackage to support WiX v4 and v5 on Windows

2025-04-29 Thread Alexey Semenyuk
On Sat, 26 Apr 2025 13:17:16 GMT, Oliver Kopp wrote: >>> jpackage allows override of main WiX source file (main.wxs), do you know >>> what will happen if user will add main.wxs with format features available >>> only in WiX 5 and will have WiX 5 toolkit installed? >> >> jpackage will detect th

Integrated: 8354996: Reduce dynamic code generation for a single downcall

2025-04-29 Thread Chen Liang
On Thu, 17 Apr 2025 19:44:07 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 > > Also see #

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: 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: 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

  1   2   >