Re: RFR: 8342382: Implement JEP 522: G1 GC: Improve Throughput by Reducing Synchronization [v55]

2025-09-20 Thread Andrew Haley
On Wed, 10 Sep 2025 11:38:38 GMT, Thomas Schatzl wrote: > I can argue I was following precedent :) You were, but it's a precedent that needs to die. > I see your point though. What do you suggest to do here? Use `count` > throughout instead? Yes, although it might need a couple more comments.

Re: RFR: 8342382: Implement JEP 522: G1 GC: Improve Throughput by Reducing Synchronization [v55]

2025-09-18 Thread Andrew Haley
On Wed, 10 Sep 2025 07:56:42 GMT, Thomas Schatzl wrote: >> Hi all, >> >> please review this change that implements (currently Draft) JEP: G1: >> Improve Application Throughput with a More Efficient Write-Barrier. >> >> The reason for posting this early is that this is a large change, and the

Re: RFR: 8342382: Implement JEP 522: G1 GC: Improve Throughput by Reducing Synchronization [v55]

2025-09-18 Thread Andrew Haley
On Fri, 12 Sep 2025 08:27:01 GMT, Martin Doerr wrote: > Other idea: set count = noreg to prevent usage after it is used under the > other name. That wouldn't have solved the aliasing problem, because count and end were being used as aliases for a register in _the same instruction_! --

Re: RFR: 8342382: Implement JEP 522: G1 GC: Improve Throughput by Reducing Synchronization [v61]

2025-09-18 Thread Andrew Haley
On Mon, 15 Sep 2025 07:18:14 GMT, Thomas Schatzl wrote: >> Hi all, >> >> please review this change that implements (currently Draft) JEP: G1: >> Improve Application Throughput with a More Efficient Write-Barrier. >> >> The reason for posting this early is that this is a large change, and the

Re: RFR: 8359419: AArch64: Relax min vector length to 32-bit for short vectors [v4]

2025-07-22 Thread Andrew Haley
On Wed, 9 Jul 2025 01:23:43 GMT, Xiaohong Gong wrote: >> ### Background >> On AArch64, the minimum vector length supported is 64-bit for basic types, >> except for `byte` and `boolean` (32-bit and 16-bit respectively to match >> special Vector API features). This limitation prevents intrinsific

Integrated: 8361497: Scoped Values: orElse and orElseThrow do not access the cache

2025-07-21 Thread Andrew Haley
On Mon, 7 Jul 2025 16:13:08 GMT, Andrew Haley wrote: > Neither `ScopedValue.orElse` nor `ScopedValue.orElseThrow` consult the cache > when searching for a binding. Neither do they update the cache when a binding > is found. > While this issue does not affect spec compliance, it i

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

2025-07-14 Thread Andrew Haley
On Mon, 7 Jul 2025 12:36:40 GMT, Thomas Schatzl wrote: >> Hi all, >> >> please review this change that implements (currently Draft) JEP: G1: >> Improve Application Throughput with a More Efficient Write-Barrier. >> >> The reason for posting this early is that this is a large change, and the

Re: RFR: 8361497: Scoped Values: orElse and orElseThrow do not access the cache

2025-07-08 Thread Andrew Haley
On Mon, 7 Jul 2025 16:33:22 GMT, Chen Liang wrote: > Can `get` and `slowGet` be refactored to use this `findBinding` too? Not really, no. Inlining is critical here, and `get()` is written in this way for efficiency of generated code. - PR Comment: https://git.openjdk.org/jdk/pull

Re: RFR: 8361497: Scoped Values: orElse and orElseThrow do not access the cache

2025-07-07 Thread Andrew Haley
On Mon, 7 Jul 2025 16:13:08 GMT, Andrew Haley wrote: > Neither `ScopedValue.orElse` nor `ScopedValue.orElseThrow` consult the cache > when searching for a binding. Neither do they update the cache when a binding > is found. > While this issue does not affect spec compliance, it i

RFR: 8361497: Scoped Values: orElse and orElseThrow do not access the cache

2025-07-07 Thread Andrew Haley
Neither `ScopedValue.orElse` nor `ScopedValue.orElseThrow` consult the cache when searching for a binding. Neither do they update the cache when a binding is found. While this issue does not affect spec compliance, it is surprising to users that `x.orElse(other)` should be slower than `x.isBound

Integrated: 8360884: Better scoped values

2025-07-07 Thread Andrew Haley
On Fri, 27 Jun 2025 14:32:11 GMT, Andrew Haley wrote: > Scoped values cannot be used early in the JDK boot process because of some > dependencies on System.getProperty(). This dependency should be removed in a > way that allows scoped values to be created (but not necessarily bound)

Re: RFR: 8359419: AArch64: Relax min vector length to 32-bit for short vectors [v3]

2025-07-04 Thread Andrew Haley
On Thu, 3 Jul 2025 06:10:28 GMT, Xiaohong Gong wrote: >> ### Background >> On AArch64, the minimum vector length supported is 64-bit for basic types, >> except for `byte` and `boolean` (32-bit and 16-bit respectively to match >> special Vector API features). This limitation prevents intrinsific

Re: RFR: 8360884: Better scoped values [v5]

2025-07-03 Thread Andrew Haley
alue's constructor has a synchronized block, which limits the > use of scoped values at runtime. Constructing a scoped value should be a > thread-local operation. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Little th

Re: RFR: 8359419: AArch64: Relax min vector length to 32-bit for short vectors [v2]

2025-07-02 Thread Andrew Haley
On Wed, 2 Jul 2025 02:39:33 GMT, Xiaohong Gong wrote: >> ### Background >> On AArch64, the minimum vector length supported is 64-bit for basic types, >> except for `byte` and `boolean` (32-bit and 16-bit respectively to match >> special Vector API features). This limitation prevents intrinsific

Re: RFR: 8360884: Better scoped values [v4]

2025-07-01 Thread Andrew Haley
alue's constructor has a synchronized block, which limits the > use of scoped values at runtime. Constructing a scoped value should be a > thread-local operation. Andrew Haley has updated the pull request incrementally with two additional commits since the last revision: -

Re: RFR: 8360884: Better scoped values [v3]

2025-07-01 Thread Andrew Haley
On Mon, 30 Jun 2025 15:55:03 GMT, Alan Bateman wrote: > There's something a bit uncomfortable about initializing hashGenerator in > ScopedValue's class initializer, then changing it in Constants class > initializer. Iimmediately clear what the memory model issues. It doesn't of > course matter

Re: RFR: 8359419: AArch64: Relax min vector length to 32-bit for short vectors

2025-07-01 Thread Andrew Haley
On Tue, 1 Jul 2025 05:59:15 GMT, Xiaohong Gong wrote: > ### Background > On AArch64, the minimum vector length supported is 64-bit for basic types, > except for `byte` and `boolean` (32-bit and 16-bit respectively to match > special Vector API features). This limitation prevents intrinsificatio

Re: RFR: 8360884: Better scoped values [v3]

2025-06-30 Thread Andrew Haley
On Fri, 27 Jun 2025 15:44:16 GMT, Chen Liang wrote: >> Andrew Haley has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Move THREAD_LOCAL_RANDOM_ACCESS into class Cache.Constants > > src/java.base/share/clas

Re: RFR: 8360884: Better scoped values [v3]

2025-06-30 Thread Andrew Haley
alue's constructor has a synchronized block, which limits the > use of scoped values at runtime. Constructing a scoped value should be a > thread-local operation. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Move TH

Re: RFR: 8360884: Better scoped values [v2]

2025-06-30 Thread Andrew Haley
alue's constructor has a synchronized block, which limits the > use of scoped values at runtime. Constructing a scoped value should be a > thread-local operation. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision:

Re: RFR: 8360884: Better scoped values

2025-06-27 Thread Andrew Haley
On Fri, 27 Jun 2025 15:12:57 GMT, Chen Liang wrote: > I looked at the existing code: the reason ScopedValue creation requires > getProperty in Cache is that `generateKey` uses `Cache.primarySlot(x)` and > `Cache.secondarySlot(x)`. Why did you choose to factor out `getProperty` into > a new cla

RFR: 8360884: Better scoped values

2025-06-27 Thread Andrew Haley
Scoped values cannot be used early in the JDK boot process because of some dependencies on System.getProperty(). This repen dency should be removed in a way that allows scoped values to be created (but not necessarily bound) at any stage during boot. Also, Scoped Value's constructor has a synch

Re: RFR: 8357531: The `SegmentBulkOperations::fill` method can be improved using overlaps [v6]

2025-05-29 Thread Andrew Haley
On Tue, 27 May 2025 12:03:41 GMT, Per Minborg wrote: >> This PR builds on a concept John Rose told me about some time ago. Instead >> of combining memory operations of various sizes, a single large and skewed >> memory operation can be made to clean up the tail of remaining bytes. >> >> This h

Integrated: 8355022: Implement JEP 506: Scoped Values

2025-05-28 Thread Andrew Haley
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. This pull request has now been integrated. Changeset: 4e1878ca Author: Andrew Haley URL:

Re: RFR: 8354674: AArch64: Intrinsify Unsafe::setMemory [v8]

2025-05-27 Thread Andrew Haley
On Thu, 15 May 2025 16:03:44 GMT, Andrew Haley wrote: >> This intrinsic is generally faster than the current implementation for >> Panama segment operations for all writes larger than about 8 bytes in size, >> increasing to more than 2* the performance on larger memory blocks

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

2025-05-22 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 with a new target base due to a merge or a rebase. The pull request now contains 11 commits: - Merge from

Integrated: 8354674: AArch64: Intrinsify Unsafe::setMemory

2025-05-16 Thread Andrew Haley
On Fri, 9 May 2025 14:11:27 GMT, Andrew Haley wrote: > This intrinsic is generally faster than the current implementation for Panama > segment operations for all writes larger than about 8 bytes in size, > increasing to more than 2* the performance on larger memory blocks on >

Re: RFR: 8354674: AArch64: Intrinsify Unsafe::setMemory [v8]

2025-05-15 Thread Andrew Haley
nama false 262143 avgt 10 8345.300 ± > 80.161 ns/op > MemorySegmentFillUnsafe.unsafe true 262143 avgt 10 2930.594 ± > 0.180 ns/op > MemorySegmentFillUnsafe.unsafe false 262143 avgt 10 3136.828 ± > 0.232 ns/op Andrew Haley has updated the pull re

Re: RFR: 8354674: AArch64: Intrinsify Unsafe::setMemory [v6]

2025-05-15 Thread Andrew Haley
On Wed, 14 May 2025 15:36:32 GMT, Andrew Dinn wrote: > Looks good to me. Sorry, please approve again. - PR Comment: https://git.openjdk.org/jdk/pull/25147#issuecomment-2884310593

Re: RFR: 8354674: AArch64: Intrinsify Unsafe::setMemory [v7]

2025-05-15 Thread Andrew Haley
nama false 262143 avgt 10 8345.300 ± > 80.161 ns/op > MemorySegmentFillUnsafe.unsafe true 262143 avgt 10 2930.594 ± > 0.180 ns/op > MemorySegmentFillUnsafe.unsafe false 262143 avgt 10 3136.828 ± > 0.232 ns/op Andrew Haley has updated the pull re

Re: RFR: 8354674: AArch64: Intrinsify Unsafe::setMemory [v6]

2025-05-14 Thread Andrew Haley
nama false 262143 avgt 10 8345.300 ± > 80.161 ns/op > MemorySegmentFillUnsafe.unsafe true 262143 avgt 10 2930.594 ± > 0.180 ns/op > MemorySegmentFillUnsafe.unsafe false 262143 avgt 10 3136.828 ± > 0.232 ns/op Andrew Haley has updated the p

Re: RFR: 8354674: AArch64: Intrinsify Unsafe::setMemory [v2]

2025-05-13 Thread Andrew Haley
On Mon, 12 May 2025 09:39:48 GMT, Andrew Haley wrote: > > Looking at the improvements made, I suggest we also change (in > > `SegmentBulkOperations`): > > ``` > > private static final int NATIVE_THRESHOLD_FILL = powerOfPropertyOr("fill", > > Architectur

Re: RFR: 8354674: AArch64: Intrinsify Unsafe::setMemory [v5]

2025-05-13 Thread Andrew Haley
nama false 262143 avgt 10 8345.300 ± > 80.161 ns/op > MemorySegmentFillUnsafe.unsafe true 262143 avgt 10 2930.594 ± > 0.180 ns/op > MemorySegmentFillUnsafe.unsafe false 262143 avgt 10 3136.828 ± > 0.232 ns/op Andrew Haley has updated the pull req

Re: RFR: 8354674: AArch64: Intrinsify Unsafe::setMemory [v4]

2025-05-13 Thread Andrew Haley
nama false 262143 avgt 10 8345.300 ± > 80.161 ns/op > MemorySegmentFillUnsafe.unsafe true 262143 avgt 10 2930.594 ± > 0.180 ns/op > MemorySegmentFillUnsafe.unsafe false 262143 avgt 10 3136.828 ± > 0.232 ns/op Andrew Haley has updated the pull re

Re: RFR: 8354674: AArch64: Intrinsify Unsafe::setMemory [v3]

2025-05-12 Thread Andrew Haley
On Mon, 12 May 2025 09:48:03 GMT, Andrew Dinn wrote: >> Andrew Haley has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Stub stack frame > > src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp line 2619: >

Re: RFR: 8354674: AArch64: Intrinsify Unsafe::setMemory [v2]

2025-05-12 Thread Andrew Haley
On Mon, 12 May 2025 06:52:12 GMT, Per Minborg wrote: > Looking at the improvements made, I suggest we also change (in > `SegmentBulkOperations`): > > ``` > private static final int NATIVE_THRESHOLD_FILL = powerOfPropertyOr("fill", > Architecture.isAARCH64() ? 18 : 5); > ``` > > to > > ``` >

Re: RFR: 8354674: AArch64: Intrinsify Unsafe::setMemory [v3]

2025-05-12 Thread Andrew Haley
nama false 262143 avgt 10 8345.300 ± > 80.161 ns/op > MemorySegmentFillUnsafe.unsafe true 262143 avgt 10 2930.594 ± > 0.180 ns/op > MemorySegmentFillUnsafe.unsafe false 262143 avgt 10 3136.828 ± > 0.232 ns/op Andrew Haley has updated the pull re

Re: RFR: 8354674: AArch64: Intrinsify Unsafe::setMemory [v2]

2025-05-12 Thread Andrew Haley
On Mon, 12 May 2025 09:18:13 GMT, Andrew Dinn wrote: >> Andrew Haley has updated the pull request incrementally with one additional >> commit since the last revision: >> >> generate_unsafecopy_common_error_exit > > src/hotspot/cpu/aarch64/stubGenerator_aar

Re: RFR: 8354674: AArch64: Intrinsify Unsafe::setMemory [v2]

2025-05-09 Thread Andrew Haley
nama false 262143 avgt 10 8345.300 ± > 80.161 ns/op > MemorySegmentFillUnsafe.unsafe true 262143 avgt 10 2930.594 ± > 0.180 ns/op > MemorySegmentFillUnsafe.unsafe false 262143 avgt 10 3136.828 ± > 0.232 ns/op Andrew Haley has updated the pull re

Re: RFR: 8354674: AArch64: Intrinsify Unsafe::setMemory

2025-05-09 Thread Andrew Haley
On Fri, 9 May 2025 14:11:27 GMT, Andrew Haley wrote: > This intrinsic is generally faster than the current implementation for Panama > segment operations for all writes larger than about 8 bytes in size, > increasing to more than 2* the performance on larger memory blocks on >

Re: RFR: 8354674: AArch64: Intrinsify Unsafe::setMemory

2025-05-09 Thread Andrew Haley
On Fri, 9 May 2025 14:11:27 GMT, Andrew Haley wrote: > This intrinsic is generally faster than the current implementation for Panama > segment operations for all writes larger than about 8 bytes in size, > increasing to more than 2* the performance on larger memory blocks on >

Re: RFR: 8354674: AArch64: Intrinsify Unsafe::setMemory

2025-05-09 Thread Andrew Haley
On Fri, 9 May 2025 14:11:27 GMT, Andrew Haley wrote: > This intrinsic is generally faster than the current implementation for Panama > segment operations for all writes larger than about 8 bytes in size, > increasing to more than 2* the performance on larger memory blocks on >

RFR: 8354674: AArch64: Intrinsify Unsafe::setMemory

2025-05-09 Thread Andrew Haley
This intrinsic is generally faster than the current implementation for Panama segment operations for all writes larger than about 8 bytes in size, increasing to more than 2* the performance on larger memory blocks on Graviton 2, between "panama" (C2 generated, what we use now) and "unsafe" (this

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

2025-05-09 Thread Andrew Haley
On Thu, 8 May 2025 18:18:44 GMT, Chen Liang wrote: > I noted that `ThreadFlock` is using scoped values but throwing > `StructureViolationException` introduced by structured concurrency - is it > considered an implementation artifact and part of structured concurrency > instead? > > Context: t

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

2025-05-08 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: Fix merge - Changes: - a

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

2025-05-08 Thread Andrew Haley
On Wed, 30 Apr 2025 12:48:08 GMT, Alan Bateman wrote: > @theRealAph Can you include the update to javax/security/auth/Subject.java as > part of this? Fixed now. - PR Comment: https://git.openjdk.org/jdk/pull/24923#issuecomment-2863756144

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

2025-05-08 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 n

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

2025-05-08 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 with a new target base due to a merge or a rebase. The pull request now contains nine commits: - Fix merge - M

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

2025-05-07 Thread Andrew Haley
On Tue, 6 May 2025 21:45:34 GMT, Mohamed Issa wrote: >> The goal of this PR is to implement an x86_64 intrinsic for >> java.lang.Math.cbrt() using libm. There is a new set of micro-benchmarks are >> included to check the performance of specific input value ranges to help >> prevent regressions

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

2025-05-02 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 two additional commits since the last revision: - Remove unnecessary @since 25 - Remove un

Re: RFR: 8355698: JDK not supporting sleef could cause exception at runtime after JDK-8353786

2025-05-02 Thread Andrew Haley
On Thu, 1 May 2025 08:50:27 GMT, Hamlin Li wrote: > > Overall, it still looks like a JDK build issue to me. Hiding problems > > occurred during the build is not good. If some toolchains can't > > successfully build the library, the library shouldn't be included in JDK. > > No, in riscv case (p

Re: RFR: 8355698: JDK not supporting sleef could cause exception at runtime after JDK-8353786

2025-05-02 Thread Andrew Haley
). Again, this is an unhelpful thing to do. If the environment doesn't support building the full JDK, kick it out. -- Andrew Haley (he/him) Java Platform Lead Engineer Red Hat UK Ltd. <https://www.redhat.com> https://keybase.io/andrewhaley EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671

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

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 n

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: 8353686: Optimize Math.cbrt for x86 64 bit platforms

2025-04-26 Thread Andrew Haley
On Sun, 6 Apr 2025 03:48:22 GMT, Mohamed Issa wrote: > the built in **cbrt** micro-benchmark How should we run that benchmark? Thanks. - PR Comment: https://git.openjdk.org/jdk/pull/24470#issuecomment-2832035668

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

2025-04-26 Thread Andrew Haley
On Sun, 6 Apr 2025 03:48:22 GMT, Mohamed Issa wrote: > The goal of this PR is to implement an x86_64 intrinsic for > java.lang.Math.cbrt() using libm. > > The results of all tests posted below were captured with an [Intel® Xeon > 6761P](https://www.intel.com/content/www/us/en/products/sku/2418

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 [v19]

2025-04-21 Thread Andrew Haley
On Sun, 20 Apr 2025 16:07:56 GMT, fabioromano1 wrote: >> 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

Re: RFR: 8077587: BigInteger Roots [v19]

2025-04-21 Thread Andrew Haley
On Sun, 20 Apr 2025 16:07:56 GMT, fabioromano1 wrote: >> 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

Re: RFR: 8077587: BigInteger Roots [v19]

2025-04-21 Thread Andrew Haley
On Sun, 20 Apr 2025 16:07:56 GMT, fabioromano1 wrote: >> 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

Re: RFR: 8349184: [JMH] jdk.incubator.vector.ColumnFilterBenchmark.filterDoubleColumn fails on linux-aarch64 [v2]

2025-02-03 Thread Andrew Haley
On Mon, 3 Feb 2025 04:16:57 GMT, SendaoYan wrote: >> Hi all, >> Several JMH tests fails "Unrecognized VM option 'UseAVX=2'" on >> linux-aarch64. The VM option '-XX:UseAVX=2' only support on x86_64 platform. >> This PR add option '-XX:+IgnoreUnrecognizedVMOptions' to make test run >> normally o

Re: RFR: 8307513: C2: intrinsify Math.max(long,long) and Math.min(long,long) [v6]

2024-12-20 Thread Andrew Haley
On Fri, 20 Dec 2024 15:42:14 GMT, Fei Gao wrote: >> Galder Zamarreño has updated the pull request incrementally with five >> additional commits since the last revision: >> >> - Added comment around the assertions >> - Adjust min/max identity IR test expectations after changes >> - Fix style

Integrated: 8339916: AIOOBE due to Math.abs(Integer.MIN_VALUE) in tests

2024-11-22 Thread Andrew Haley
On Thu, 21 Nov 2024 17:21:07 GMT, Andrew Haley wrote: > Test bug. > > Another bug caused by the result of `Math.abs()` being negative. I also tried > `floorMod()`, which would have been cleaner, but it increased the runtime of > this extremely time-sensitive benchmark. This p

Re: RFR: 8339916: AIOOBE due to Math.abs(Integer.MIN_VALUE) in tests

2024-11-22 Thread Andrew Haley
On Fri, 22 Nov 2024 10:36:21 GMT, Rémi Forax wrote: > Let say that the definition of Math.abs() is surprising If anything is surprising, it's the definition of `%` . Which is compatible with `/`, but otherwise useless. - PR Comment: https://git.openjdk.org/jdk/pull/22297#issuecom

RFR: 8339916: AIOOBE due to Math.abs(Integer.MIN_VALUE) in tests

2024-11-21 Thread Andrew Haley
Test bug. Another bug caused by the result of `Math.abs()` being negative. I also tried `floorMod()`, which would have been cleaner, but it increased the runtime of this extremely time-sensitive benchmark. - Commit messages: - Fix integer overflow in abs() Changes: https://git.op

Re: RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning

2024-11-06 Thread Andrew Haley
On Tue, 22 Oct 2024 15:48:43 GMT, Andrew Haley wrote: >> src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp line 60: >> >>> 58: >>> 59: assert(LockingMode != LM_LIGHTWEIGHT, "lightweight locking should use >>> fast_lock_lightweight"); &

Re: RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning

2024-11-06 Thread Andrew Haley
On Tue, 22 Oct 2024 15:37:23 GMT, Andrew Haley wrote: >> This is the implementation of JEP 491: Synchronize Virtual Threads without >> Pinning. See [JEP 491](https://bugs.openjdk.org/browse/JDK-8337395) for >> further details. >> >> In order to make the code

Re: RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning

2024-11-06 Thread Andrew Haley
On Thu, 17 Oct 2024 14:28:30 GMT, Patricio Chilano Mateo wrote: > * We copy the oops stored in the LockStack of the carrier to the > stackChunk when freezing (and clear the LockStack). We copy the oops back to > the LockStack of the next carrier when thawing for the first time (and clear

Integrated: 8341903: Implementation of Scoped Values (Fourth Preview)

2024-11-05 Thread Andrew Haley
On Thu, 10 Oct 2024 16:16:51 GMT, Andrew Haley wrote: > The fourth preview of scoped values. This pull request has now been integrated. Changeset: 3fab8e37 Author: Andrew Haley URL: https://git.openjdk.org/jdk/commit/3fab8e37bbebbb3930108b2015efe488b1fa1e97 Stats: 161 lines i

Re: RFR: 8341903: Implementation of Scoped Values (Fourth Preview) [v7]

2024-11-01 Thread Andrew Haley
> The fourth preview of scoped values. Andrew Haley 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 10 additional commits since the last revis

Re: RFR: 8341903: Implementation of Scoped Values (Fourth Preview) [v6]

2024-10-29 Thread Andrew Haley
> The fourth preview of scoped values. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Typo in comment. (Thanks, Roland!) - Changes: - all: https://git.openjdk.org/jdk/pull/21456/files - new: https://git.openjdk.

Re: RFR: 8341903: Implementation of Scoped Values (Fourth Preview) [v5]

2024-10-23 Thread Andrew Haley
> The fourth preview of scoped values. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: API change - Changes: - all: https://git.openjdk.org/jdk/pull/21456/files - new: https://git.openjdk.org/jdk/pull/21456/fi

Re: RFR: 8338383: Implementation of Synchronize Virtual Threads without Pinning [v3]

2024-10-22 Thread Andrew Haley
On Tue, 22 Oct 2024 15:37:23 GMT, Andrew Haley wrote: >> Patricio Chilano Mateo has updated the pull request incrementally with six >> additional commits since the last revision: >> >> - Fix comments in objectMonitor.hpp >> - Move frame::saved_thread_address

Re: RFR: 8338383: Implementation of Synchronize Virtual Threads without Pinning [v3]

2024-10-22 Thread Andrew Haley
On Tue, 22 Oct 2024 15:48:43 GMT, Andrew Haley wrote: >> src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp line 60: >> >>> 58: >>> 59: assert(LockingMode != LM_LIGHTWEIGHT, "lightweight locking should use >>> fast_lock_lightweight"); &

Re: RFR: 8338383: Implementation of Synchronize Virtual Threads without Pinning [v3]

2024-10-22 Thread Andrew Haley
On Tue, 22 Oct 2024 02:14:23 GMT, Patricio Chilano Mateo wrote: >> This is the implementation of JEP 491: Synchronize Virtual Threads without >> Pinning. See [JEP 491](https://bugs.openjdk.org/browse/JDK-8337395) for >> further details. >> >> In order to make the code review easier the change

Re: RFR: 8338383: Implementation of Synchronize Virtual Threads without Pinning [v3]

2024-10-22 Thread Andrew Haley
On Tue, 22 Oct 2024 02:14:23 GMT, Patricio Chilano Mateo wrote: >> This is the implementation of JEP 491: Synchronize Virtual Threads without >> Pinning. See [JEP 491](https://bugs.openjdk.org/browse/JDK-8337395) for >> further details. >> >> In order to make the code review easier the change

Re: RFR: 8338383: Implementation of Synchronize Virtual Threads without Pinning [v3]

2024-10-22 Thread Andrew Haley
On Tue, 22 Oct 2024 02:14:23 GMT, Patricio Chilano Mateo wrote: >> This is the implementation of JEP 491: Synchronize Virtual Threads without >> Pinning. See [JEP 491](https://bugs.openjdk.org/browse/JDK-8337395) for >> further details. >> >> In order to make the code review easier the change

Re: RFR: 8341903: Implementation of Scoped Values (Fourth Preview) [v4]

2024-10-14 Thread Andrew Haley
> The fourth preview of scoped values. Andrew Haley 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 seven additional commits since the last revis

Re: RFR: 8341903: Implementation of Scoped Values (Fourth Preview) [v3]

2024-10-14 Thread Andrew Haley
On Mon, 14 Oct 2024 13:40:50 GMT, Andrew Haley wrote: >> The fourth preview of scoped values. > > Andrew Haley has updated the pull request incrementally with two additional > commits since the last revision: > > - Scoped values > - Scoped values Tier1 and Tie

Re: RFR: 8341903: Implementation of Scoped Values (Fourth Preview) [v3]

2024-10-14 Thread Andrew Haley
> The fourth preview of scoped values. Andrew Haley has updated the pull request incrementally with two additional commits since the last revision: - Scoped values - Scoped values - Changes: - all: https://git.openjdk.org/jdk/pull/21456/files - new: https://git.openjdk.

Re: RFR: 8341903: Implementation of Scoped Values (Fourth Preview) [v2]

2024-10-10 Thread Andrew Haley
> The fourth preview of scoped values. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Fix javadoc - Changes: - all: https://git.openjdk.org/jdk/pull/21456/files - new: https://git.openjdk.org/jdk/pull/21456/fi

RFR: 8341903: Implementation of Scoped Values (Fourth Preview)

2024-10-10 Thread Andrew Haley
The fourth preview of scoped values. - Commit messages: - Scoped Values API changes - Scoped Values API changes - Scoped Values API changes Changes: https://git.openjdk.org/jdk/pull/21456/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21456&range=00 Issue: https://bugs

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace

2024-10-09 Thread Andrew Haley
On Tue, 3 Sep 2024 15:50:13 GMT, Thomas Stuefe wrote: >>> > I don't think the costs for two address comparisons matter, not with the >>> > comparatively few deallocations that happen (few hundreds or few >>> > thousand). If deallocate is hot, we are using metaspace wrong. >>> >>> MethodData do

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v6]

2024-10-09 Thread Andrew Haley
On Wed, 9 Oct 2024 06:07:13 GMT, John R Rose wrote: > If the interfaces had a compact numbering, and there were a side table > mapping the compact numbers to interface Klass* pointers, then I think > Andrew's code would still work (with natural adjustments). Probably, yes. I can pack klass ID+

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v6]

2024-10-09 Thread Andrew Haley
On Wed, 9 Oct 2024 09:00:06 GMT, Andrew Haley wrote: >> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Replace Metaspace::is_compressed_klass_ptr with >> CompressedKlassPointers::is_in_

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v6]

2024-10-09 Thread Andrew Haley
yet making Klass pointers a table index. Another chained load in the path of method dispatch, at a time when I'm trying to get rid of chained loads, would be a Bad Thing for me. -- Andrew Haley (he/him) Java Platform Lead Engineer Red Hat UK Ltd. <https://www.redhat.com> https://keybase.io/andrewhaley EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671 - PR Comment: https://git.openjdk.org/jdk/pull/19157#issuecomment-2401747594

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v6]

2024-10-08 Thread Andrew Haley
mmit since the last revision: > > Replace Metaspace::is_compressed_klass_ptr with > CompressedKlassPointers::is_in_encoding_range. On 8 Oct 2024, at 4:07, Andrew Haley wrote: > On 9/10/24 12:42, Coleen Phillimore wrote: >> Thanks for reviewing Ioi and Thomas, and thank you Thomas for the

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v6]

2024-10-08 Thread Andrew Haley
s a way to represent interface pointers in a compact way in lookup tables, and to be able to get from compressed class pointers to the address. As long as interface pointers are in a 32-bit range and there's a fast way to get from compressed class to address that's OK. -- Andrew Haley (he/

Re: RFR: 8307513: C2: intrinsify Math.max(long,long) and Math.min(long,long) [v3]

2024-09-27 Thread Andrew Haley
On Fri, 27 Sep 2024 14:15:04 GMT, Galder Zamarreño wrote: > The only situation where this PR is a regression compared to current code is > when the one of the branch side is always taken. Bear in mind that's quite common. It's not very unusual to clip a range with something equivalent to `x =

Re: RFR: 8338694: x86_64 intrinsic for tanh using libm

2024-08-28 Thread Andrew Haley
On Tue, 27 Aug 2024 22:23:44 GMT, Srinivas Vamsi Parasa wrote: >> I agree, this is all rather obscure. Ideally the same names that are used in >> wherever this comes from. >> >> Where does the algorithm come from? What are its accuracy guarantees? >> >> In addition, given the rarity of hyperb

Re: RFR: 8338694: x86_64 intrinsic for tanh using libm

2024-08-27 Thread Andrew Haley
On 8/27/24 12:13, Jatin Bhateja wrote: Hi @vamsi-parasa , Kindly also add a JMH micro benchmark, I did a first run and see around 4% performance drop with attached micro on Sapphire Rapids. [test.txt](https://github.com/user-attachments/files/16761142/test.txt) If I had to guess, that's beca

Re: RFR: 8338694: x86_64 intrinsic for tanh using libm

2024-08-27 Thread Andrew Haley
On Tue, 27 Aug 2024 05:24:34 GMT, Jatin Bhateja wrote: >> The goal of this PR is to implement an x86_64 intrinsic for >> java.lang.Math.tanh() using libm >> >> Benchmark (ops/ms) | Stock JDK | Tanh intrinsic | Speedup >> -- | -- | -- | -- >> MathBench.tanhDouble | 70900 | 95618 | 1.35x > > src/

Re: RFR: 8331341: secondary_super_cache does not scale well: C1 and interpreter [v9]

2024-07-26 Thread Andrew Haley
On Fri, 26 Jul 2024 18:39:27 GMT, Vladimir Ivanov wrote: > Oh, it comes as a surprise to me... I was under impression that the first > thing hand-coded assembly variants do is check for `bitmap != > SECONDARY_SUPERS_BITMAP_FULL`. At least, it was my recollection from working > on [JDK-8180450]

Re: RFR: 8331341: secondary_super_cache does not scale well: C1 and interpreter [v8]

2024-07-26 Thread Andrew Haley
On Thu, 25 Jul 2024 23:31:21 GMT, Vladimir Ivanov wrote: > Thanks! The patch looks good, except there was one failure observed during > testing with the latest patch [1]. It does look related to the latest changes > you did in > [54050a5](https://github.com/openjdk/jdk/pull/19989/commits/54050

Re: RFR: 8331341: secondary_super_cache does not scale well: C1 and interpreter [v9]

2024-07-26 Thread Andrew Haley
this code is only used for generating stubs, and it seemed to me > ridiculous to have stubs calling other stubs. > > I've followed the guidance from @iwanowww not to obsess too much about > the performance of C1-compiled secondary supers lookups, and to prefer > sim

Re: RFR: 8331341: secondary_super_cache does not scale well: C1 and interpreter [v8]

2024-07-25 Thread Andrew Haley
On Thu, 25 Jul 2024 16:05:49 GMT, Andrew Haley wrote: >> This patch expands the use of a hash table for secondary superclasses >> to the interpreter, C1, and runtime. It also adds a C2 implementation >> of hashed lookup in cases where the superclass isn't known at compile

Re: RFR: 8331341: secondary_super_cache does not scale well: C1 and interpreter [v8]

2024-07-25 Thread Andrew Haley
this code is only used for generating stubs, and it seemed to me > ridiculous to have stubs calling other stubs. > > I've followed the guidance from @iwanowww not to obsess too much about > the performance of C1-compiled secondary supers lookups, and to prefer > simplicity over abso

Re: RFR: 8331341: secondary_super_cache does not scale well: C1 and interpreter [v7]

2024-07-25 Thread Andrew Haley
this code is only used for generating stubs, and it seemed to me > ridiculous to have stubs calling other stubs. > > I've followed the guidance from @iwanowww not to obsess too much about > the performance of C1-compiled secondary supers lookups, and to prefer > simplicity over absol

Re: RFR: 8331341: secondary_super_cache does not scale well: C1 and interpreter [v6]

2024-07-25 Thread Andrew Haley
On Wed, 24 Jul 2024 19:09:06 GMT, Vladimir Ivanov wrote: >>> > Also also, Klass::is_subtype_of() is used for C1 runtime. >>> >>> Can you elaborate, please? >> >> Sorry, that was rather vague. In C1-compiled code, the Java method >> `Class::isInstance(Object)`calls `Klass::is_subtype_of()`. >>

  1   2   3   >