Re: RFR: 8331189: Implementation of Scoped Values (Third Preview)

2024-05-21 Thread Andrew Haley
On Wed, 8 May 2024 09:40:38 GMT, Alan Bateman wrote: > JEP 481 proposes Scoped Values to continue to preview in JDK 23 with one > change. The type of the operation parameter of the callWhere method is > changed to a new functional interface to avoid having the API throw > Exception. With that

Re: RFR: 8325438: Add exhaustive tests for Math.round intrinsics [v12]

2024-04-28 Thread Andrew Haley
On Tue, 23 Apr 2024 09:46:08 GMT, Hamlin Li wrote: >> HI, >> Can you have a look at this patch adding some tests for Math.round >> instrinsics? >> Thanks! >> >> ### FYI: >> During the development of RoundVF/RoundF, we faced the issues which were >> only spotted by running test exhaustively

Re: RFR: 8328066: WhiteBoxResizeTest failure on linux-x86: Could not reserve enough space for 2097152KB object heap [v3]

2024-03-15 Thread Andrew Haley
On Thu, 14 Mar 2024 14:04:51 GMT, Jaikiran Pai wrote: >> Can I please get a review of this test-only change which proposes to address >> https://bugs.openjdk.org/browse/JDK-8328066? >> >> The test launches a JVM with 2G heap (`-Xmx2G`) and as noted in that issue, >> the failure was observed

RFR: JDK-8180450: secondary_super_cache does not scale well

2024-03-14 Thread Andrew Haley
This PR is a redesign of subtype checking. The implementation of subtype checking in the HotSpot JVM is now twenty years old. There have been some performance-related bugs reported, and the only way to fix them is a redesign of the way it works. So what's changed, so that the old design

Re: RFR: 8318809: java/util/concurrent/ConcurrentLinkedQueue/WhiteBox.java shows intermittent failures on linux ppc64le and aarch64

2023-12-06 Thread Andrew Haley
On Tue, 5 Dec 2023 09:08:59 GMT, Andrew Haley wrote: >> We've seen some rare failures of the CLQ Whitebox test on "less-strong" >> architectures, and the only thing which -- given my research -- could be the >> culprit is spuriously failing weakCA

Re: RFR: 8318809: java/util/concurrent/ConcurrentLinkedQueue/WhiteBox.java shows intermittent failures on linux ppc64le and aarch64

2023-12-05 Thread Andrew Haley
On Wed, 22 Nov 2023 20:48:05 GMT, Viktor Klang wrote: > We've seen some rare failures of the CLQ Whitebox test on "less-strong" > architectures, and the only thing which -- given my research -- could be the > culprit is spuriously failing weakCAS (which is correct in terms of the >

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v6]

2023-12-01 Thread Andrew Haley
On Fri, 1 Dec 2023 10:19:01 GMT, Andrew Haley wrote: >> Xiaohong Gong 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 ten addi

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v6]

2023-12-01 Thread Andrew Haley
On Fri, 1 Dec 2023 08:48:52 GMT, Xiaohong Gong wrote: >> Currently the vector floating-point math APIs like >> `VectorOperators.SIN/COS/TAN...` are not intrinsified on AArch64 platform, >> which causes large performance gap on AArch64. Note that those APIs are >> optimized by C2 compiler on

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v6]

2023-12-01 Thread Andrew Haley
On Fri, 1 Dec 2023 08:48:52 GMT, Xiaohong Gong wrote: >> Currently the vector floating-point math APIs like >> `VectorOperators.SIN/COS/TAN...` are not intrinsified on AArch64 platform, >> which causes large performance gap on AArch64. Note that those APIs are >> optimized by C2 compiler on

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v5]

2023-12-01 Thread Andrew Haley
On Fri, 1 Dec 2023 01:13:37 GMT, Xiaohong Gong wrote: >> make/autoconf/lib-sleef.m4 line 56: >> >>> 54: AC_MSG_CHECKING([for the specified LIBSLEEF]) >>> 55: if test -e ${with_libsleef}/lib/libsleef.so && >>> 56:test -e ${with_libsleef}/include/sleef.h; then >> >>

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v5]

2023-12-01 Thread Andrew Haley
On Fri, 1 Dec 2023 01:19:12 GMT, Xiaohong Gong wrote: > > Not having a build time dependency on libsleef means you cannot really > > verify that the functions you want to call are correct, but maybe you feel > > secure that they will never change? > > I'm not sure. The main reason that we add

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v5]

2023-12-01 Thread Andrew Haley
On Fri, 1 Dec 2023 09:59:58 GMT, Andrew Haley wrote: > Not having a build time dependency on libsleef means you cannot really verify > that the functions you want to call are correct, but maybe you feel secure > that they will never change? We can still have SLEEF tests, but they wil

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v5]

2023-12-01 Thread Andrew Haley
On Thu, 30 Nov 2023 14:50:24 GMT, Andrew Haley wrote: >> Do this, but with the name vect_math.S. Don't use SLEEF headers in the >> build. I think you can do this with no build-time dependency on SLEEF at all >> if you load the library lazily at runtime. >> &g

Re: RFR: 8319872: AArch64: [vectorapi] Implementation of unsigned (zero extended) casts [v4]

2023-11-30 Thread Andrew Haley
On Wed, 22 Nov 2023 07:05:21 GMT, Eric Liu wrote: >> Vector API defines zero-extend operations [1], which are going to be >> intrinsified and generated to `VectorUCastNode` by C2. This patch adds >> backend implementation for `VectorUCastNode` on AArch64. >> >> The micro benchmark shows

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v5]

2023-11-30 Thread Andrew Haley
On Thu, 30 Nov 2023 11:46:58 GMT, Andrew Haley wrote: > [vect_math.S.txt](https://github.com/openjdk/jdk/files/13512306/vect_math.S.txt) I guess this will live only in os_linux and os_bsd because the Windows compiler won't like it AFAIK. - PR Comment: https://git.openjdk.org/

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v5]

2023-11-30 Thread Andrew Haley
On Thu, 30 Nov 2023 06:39:43 GMT, Xiaohong Gong wrote: >> Currently the vector floating-point math APIs like >> `VectorOperators.SIN/COS/TAN...` are not intrinsified on AArch64 platform, >> which causes large performance gap on AArch64. Note that those APIs are >> optimized by C2 compiler on

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v5]

2023-11-30 Thread Andrew Haley
On Thu, 30 Nov 2023 06:39:43 GMT, Xiaohong Gong wrote: >> Currently the vector floating-point math APIs like >> `VectorOperators.SIN/COS/TAN...` are not intrinsified on AArch64 platform, >> which causes large performance gap on AArch64. Note that those APIs are >> optimized by C2 compiler on

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v5]

2023-11-30 Thread Andrew Haley
On Thu, 30 Nov 2023 09:35:04 GMT, Magnus Ihse Bursie wrote: > This version looks much better, thank you! I guess cflags/SVE_CFLAGS is an > okay-ish solution. > > I'm still not 100% happy though, but it might be due to my limited > understanding. Let me write down a few numbered statements and

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v4]

2023-11-28 Thread Andrew Haley
On Tue, 28 Nov 2023 01:37:01 GMT, Xiaohong Gong wrote: >>> In fact, I am not even sure why it seems to the PR author to be a good idea >>> to let the default be dependent on the build machine at all. My personal >>> opinion is that it would be better to select either "SVE enabled" or "SVE >>>

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v4]

2023-11-27 Thread Andrew Haley
On Mon, 27 Nov 2023 15:22:32 GMT, Magnus Ihse Bursie wrote: > In fact, I am not even sure why it seems to the PR author to be a good idea > to let the default be dependent on the build machine at all. My personal > opinion is that it would be better to select either "SVE enabled" or "SVE >

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v4]

2023-11-27 Thread Andrew Haley
On Mon, 27 Nov 2023 14:59:23 GMT, Magnus Ihse Bursie wrote: > You still need to separate out the SVE detection from the libsleef code, and > provide a way to enable/disable it from the configure command line. Why? I don't think this should be a build-time option at all, because it puts the

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v4]

2023-11-27 Thread Andrew Haley
On Mon, 27 Nov 2023 01:06:21 GMT, Xiaohong Gong wrote: >> make/autoconf/lib-vmath.m4 line 94: >> >>> 92: # Check the ARM SVE feature >>> 93: SVE_CFLAGS="-march=armv8-a+sve" >>> 94: >> >> What's this about? We're building a standard binary, and all SVE detection >> is to

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v4]

2023-11-23 Thread Andrew Haley
On Thu, 23 Nov 2023 08:57:23 GMT, Xiaohong Gong wrote: >> Currently the vector floating-point math APIs like >> `VectorOperators.SIN/COS/TAN...` are not intrinsified on AArch64 platform, >> which causes large performance gap on AArch64. Note that those APIs are >> optimized by C2 compiler on

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v4]

2023-11-23 Thread Andrew Haley
On Thu, 23 Nov 2023 08:57:23 GMT, Xiaohong Gong wrote: >> Currently the vector floating-point math APIs like >> `VectorOperators.SIN/COS/TAN...` are not intrinsified on AArch64 platform, >> which causes large performance gap on AArch64. Note that those APIs are >> optimized by C2 compiler on

Re: RFR: 8319872: AArch64: [vectorapi] Implementation of unsigned (zero extended) casts [v3]

2023-11-22 Thread Andrew Haley
On Wed, 22 Nov 2023 02:18:32 GMT, Eric Liu wrote: >> src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp line 1412: >> >>> 1410: _sve_xunpk(is_unsigned, /* is_high */ false, dst, S, dst); >>> 1411: _sve_xunpk(is_unsigned, /* is_high */ false, dst, D, dst); >>> 1412: break;

Re: RFR: 8312425: [vectorapi] AArch64: Optimize vector math operations with SLEEF [v3]

2023-11-22 Thread Andrew Haley
On Wed, 22 Nov 2023 01:52:51 GMT, Xiaohong Gong wrote: > > Have you considered the possibility of copying the sleef source to the > > OpenJDK repository and thereby it becomes part of the build process? I > > don't know how straightforward that is technically and IANAL but I think > > it's

Re: RFR: 8319872: AArch64: [vectorapi] Implementation of unsigned (zero extended) casts [v3]

2023-11-21 Thread Andrew Haley
On Tue, 21 Nov 2023 13:24:34 GMT, Eric Liu wrote: >> Vector API defines zero-extend operations [1], which are going to be >> intrinsified and generated to `VectorUCastNode` by C2. This patch adds >> backend implementation for `VectorUCastNode` on AArch64. >> >> The micro benchmark shows

Re: RFR: 8319872: AArch64: [vectorapi] Implementation of unsigned (zero extended) casts [v3]

2023-11-21 Thread Andrew Haley
On Tue, 21 Nov 2023 13:24:34 GMT, Eric Liu wrote: >> Vector API defines zero-extend operations [1], which are going to be >> intrinsified and generated to `VectorUCastNode` by C2. This patch adds >> backend implementation for `VectorUCastNode` on AArch64. >> >> The micro benchmark shows

Re: RFR: 8310159: Bulk copy with Unsafe::arrayCopy is slower compared to memcpy

2023-11-16 Thread Andrew Haley
On Thu, 16 Nov 2023 05:38:30 GMT, Jatin Bhateja wrote: >> The results a concurrent reader sees could be different if the copy is using >> nt writes, but if the read of the destination is not synced with the copy >> operation, I think the reader would not see consistent state in either case.

Re: RFR: 8319872: AArch64: [vectorapi] Implementation of unsigned (zero extended) casts [v2]

2023-11-16 Thread Andrew Haley
On Thu, 16 Nov 2023 08:44:26 GMT, Eric Liu wrote: >> Vector API defines zero-extend operations [1], which are going to be >> intrinsified and generated to `VectorUCastNode` by C2. This patch adds >> backend implementation for `VectorUCastNode` on AArch64. >> >> The micro benchmark shows

Re: RFR: 8319872: AArch64: [vectorapi] Implementation of unsigned (zero extended) casts

2023-11-15 Thread Andrew Haley
On Wed, 15 Nov 2023 07:48:28 GMT, Eric Liu wrote: > Vector API defines zero-extend operations [1], which are going to be > intrinsified and generated to `VectorUCastNode` by C2. This patch adds > backend implementation for `VectorUCastNode` on AArch64. > > The micro benchmark shows

Integrated: JDK-8319120: Unbound ScopedValue.get() throws the wrong exception

2023-10-31 Thread Andrew Haley
On Mon, 30 Oct 2023 15:57:23 GMT, Andrew Haley wrote: > The bug here is a thinko in `ScopedValue.scopedValueBindings()`. > > If the JVM runs out of resources, we throw a `VirtualMachineError`. Running > out of resources can happen at almost any time, and can happen while >

Re: RFR: JDK-8319120: Unbound ScopedValue.get() throws the wrong exception [v2]

2023-10-30 Thread Andrew Haley
the sentinel) and `null`. We weren't doing that, we > were only checking for null. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Review feedback - Changes: - all: https://git.openjdk.org/jdk/pull/16422/files - new:

RFR: JDK-8319120: Unbound ScopedValue.get() throws the wrong exception

2023-10-30 Thread Andrew Haley
The bug here is a thinko in `ScopedValue.scopedValueBindings()`. If the JVM runs out of resources, we throw a `VirtualMachineError`. Running out of resources can happen at almost any time, and can happen while `ScopedValue`'s internal structures are being modified, leaving them in an

Re: RFR: 8317763: Follow-up to AVX512 intrinsics for Arrays.sort() PR

2023-10-11 Thread Andrew Haley
On Tue, 10 Oct 2023 18:40:30 GMT, R1chterScale wrote: > Forgive me, I might be missing something very obvious, but is there any > particular reason to entirely disable the SIMD accelerated sort on Zen 4 > rather than having an alternate code path for Zen 4 where it has the > `compressstoreu`

Re: RFR: 8310929: Optimization for Integer.toString [v13]

2023-08-31 Thread Andrew Haley
On Thu, 31 Aug 2023 14:32:43 GMT, Andrew Haley wrote: > > I'm wondering if a micro benchmark like this is very realistic. > > Exactly so! This is almost the canonical example of the "JMH considered > harmful" talk I gave recently. The subject is a joke! Yes, I love

Re: RFR: 8310929: Optimization for Integer.toString [v13]

2023-08-31 Thread Andrew Haley
On Thu, 31 Aug 2023 14:15:41 GMT, John Hendrikx wrote: > I'm wondering if a micro benchmark like this is very realistic. Exactly so! This is almost the canonical example of the "JMH considered harmful" talk I gave recently. - PR Comment:

Re: RFR: JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort) [v7]

2023-08-17 Thread Andrew Haley
On Wed, 16 Aug 2023 10:35:32 GMT, Laurent Bourgès wrote: > These benchmarks are all small arrays. We need to check for possible > regressions here. Sorry, all large arrays. I suspect that the average-length sort is not represented. > Also, I'm rather concerned that we might lose the data

Re: RFR: JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort) [v7]

2023-08-16 Thread Andrew Haley
On Thu, 15 Jun 2023 09:21:13 GMT, Laurent Bourgès wrote: >> * improved mixed insertion sort (makes whole sorting faster) >> * introduced Radix which sort shows several times boost of performance and >> has linear complexity instead of n*ln(n) >> * improved merging sort for almost sorted data

Re: RFR: 8311630: [s390] Implementation of Foreign Function & Memory API (Preview) [v6]

2023-07-28 Thread Andrew Haley
On Fri, 28 Jul 2023 03:59:26 GMT, sid8606 wrote: >> Implementation of "Foreign Function & Memory API" for s390x (Big Endian). > > sid8606 has updated the pull request incrementally with one additional commit > since the last revision: > > Preserve and restore register Z_R6 > > Though

Integrated: 8308609: java/lang/ScopedValue/StressStackOverflow.java fails with "-XX:-VMContinuations"

2023-06-16 Thread Andrew Haley
On Fri, 9 Jun 2023 16:53:15 GMT, Andrew Haley wrote: > Move `runWith()` from `VirtualThread` to `BaseVirtualThread`. > > `BoundVirtualThread` does not use `runWith()` to run its task, so when a VM > error occurs it can not recover scoped values. > > Moving `runWith()` into t

Re: RFR: 8308609: java/lang/ScopedValue/StressStackOverflow.java fails with "-XX:-VMContinuations" [v8]

2023-06-15 Thread Andrew Haley
; `BoundVirtualThread` fixes the problem. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Correct catch a top level. - Changes: - all: https://git.openjdk.org/jdk/pull/14399/files - new: https://git.openjdk.org/jdk/pull

Re: RFR: 8308609: java/lang/ScopedValue/StressStackOverflow.java fails with "-XX:-VMContinuations" [v7]

2023-06-15 Thread Andrew Haley
; `BoundVirtualThread` fixes the problem. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Don't share ThreadLocalRandom instance, cleanup. - Changes: - all: https://git.openjdk.org/jdk/pull/14399/files - new: https://git

Re: RFR: 8308609: java/lang/ScopedValue/StressStackOverflow.java fails with "-XX:-VMContinuations" [v6]

2023-06-14 Thread Andrew Haley
On Tue, 13 Jun 2023 15:50:59 GMT, Alan Bateman wrote: > The implementation changes look good. > > The update to test looks okay too although I would like to see if we can do > better in SVC and STS when there is a SO. That would be nice, but it's something of a can of worms. > In passing, I

Re: RFR: 8308609: java/lang/ScopedValue/StressStackOverflow.java fails with "-XX:-VMContinuations" [v6]

2023-06-13 Thread Andrew Haley
; `BoundVirtualThread` fixes the problem. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: One other thing - Changes: - all: https://git.openjdk.org/jdk/pull/14399/files - new: https://git.openjdk.org/jdk/pull/14399/fil

Re: RFR: 8308609: java/lang/ScopedValue/StressStackOverflow.java fails with "-XX:-VMContinuations" [v4]

2023-06-13 Thread Andrew Haley
On Mon, 12 Jun 2023 14:26:40 GMT, Alan Bateman wrote: >> Andrew Haley has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Remove ScopedValue/StressStackOverflow.java. >> - Cleanup > > test/jdk/Probl

Re: RFR: 8308609: java/lang/ScopedValue/StressStackOverflow.java fails with "-XX:-VMContinuations" [v4]

2023-06-13 Thread Andrew Haley
; `BoundVirtualThread` fixes the problem. Andrew Haley has updated the pull request incrementally with two additional commits since the last revision: - Remove ScopedValue/StressStackOverflow.java. - Cleanup - Changes: - all: https://git.openjdk.org/jdk/pull/14399/files - new: ht

Re: RFR: 8308609: java/lang/ScopedValue/StressStackOverflow.java fails with "-XX:-VMContinuations" [v3]

2023-06-13 Thread Andrew Haley
; `BoundVirtualThread` fixes the problem. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Robustify test. - Changes: - all: https://git.openjdk.org/jdk/pull/14399/files - new: https://git.openjdk.org/jdk/pull/14399/fil

Re: RFR: 8308609: java/lang/ScopedValue/StressStackOverflow.java fails with "-XX:-VMContinuations" [v2]

2023-06-12 Thread Andrew Haley
; `BoundVirtualThread` fixes the problem. Andrew Haley has updated the pull request incrementally with two additional commits since the last revision: - Whitespace - Use RunWith in base Thread class & enable testing without VM Continuations. - Changes: - all: https://git.openjdk

Re: RFR: 8308609: java/lang/ScopedValue/StressStackOverflow.java fails with "-XX:-VMContinuations"

2023-06-10 Thread Andrew Haley
On Fri, 9 Jun 2023 17:19:42 GMT, Alan Bateman wrote: >> Move `runWith()` from `VirtualThread` to `BaseVirtualThread`. >> >> `BoundVirtualThread` does not use `runWith()` to run its task, so when a VM >> error occurs it can not recover scoped values. >> >> Moving `runWith()` into the common

RFR: 8308609: java/lang/ScopedValue/StressStackOverflow.java fails with "-XX:-VMContinuations"

2023-06-09 Thread Andrew Haley
Move `runWith()` from `VirtualThread` to `BaseVirtualThread`. `BoundVirtualThread` does not use `runWith()` to run its task, so when a VM error occurs it can not recover scoped values. Moving `runWith()` into the common subclass of both `VirtualThread` and `BoundVirtualThread` fixes the

Re: RFR: 8307795: AArch64: Optimize VectorMask.truecount() on Neon [v3]

2023-05-25 Thread Andrew Haley
On Thu, 18 May 2023 09:50:13 GMT, Chang Peng wrote: >> In Vector API Java level, vector mask is represented as a boolean array with >> 0x00/0x01 (8 bits of each element) as values, aka in-memory format. When it >> is loaded into vector register, e.g. Neon, the in-memory format will be >>

Re: RFR: 8306647: Implementation of Structured Concurrency (Preview)

2023-05-23 Thread Andrew Haley
On Tue, 23 May 2023 18:23:21 GMT, Paul Sandoz wrote: > Oh, and i guess that has some performance implications in some cases? more so > on the set of instructions produced on ARM say rather than limiting C2 > optimizations? I think so. As far as I can remember, a release fence on x86 generates

Re: RFR: 8306647: Implementation of Structured Concurrency (Preview)

2023-05-23 Thread Andrew Haley
On Mon, 22 May 2023 18:42:02 GMT, Alan Bateman wrote: >> src/java.base/share/classes/java/lang/ScopedValue.java line 399: >> >>> 397: var prevSnapshot = scopedValueBindings(); >>> 398: var newSnapshot = new Snapshot(this, prevSnapshot); >>> 399: return

Re: RFR: 8307795: AArch64: Optimize VectorMask.truecount() on Neon

2023-05-15 Thread Andrew Haley
On Mon, 15 May 2023 10:04:22 GMT, Chang Peng wrote: > > This looks like it might be removed by loop opts. I think you might need a > > blackhole somewhere. > > `m` will be updated in every iteration of this loop, so `m` is not a > loop-invariants actually. I can see the assembly code of this

Re: RFR: 8307795: AArch64: Optimize VectorMask.truecount() on Neon

2023-05-15 Thread Andrew Haley
On Mon, 15 May 2023 02:58:46 GMT, Chang Peng wrote: > In Vector API Java level, vector mask is represented as a boolean array with > 0x00/0x01 (8 bits of each element) as values, aka in-memory format. When it > is loaded into vector register, e.g. Neon, the in-memory format will be >

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer [v8]

2022-12-13 Thread Andrew Haley
On Mon, 12 Dec 2022 10:42:22 GMT, Justin King wrote: >> Allow building OpenJDK with UBSan. Currently the build fails when optimizing >> the image due to lots of undefined behavior (it invokes the built JVM). >> Follow up PRs will either replace the undefined behavior with well defined >>

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer

2022-12-09 Thread Andrew Haley
On Fri, 9 Dec 2022 06:53:31 GMT, Justin King wrote: > Allow building OpenJDK with UBSan. Currently the build fails when optimizing > the image due to lots of undefined behavior (it invokes the built JVM). > Follow up PRs will either replace the undefined behavior with well defined > behavior

Re: RFR: JDK-8298448: UndefinedBehaviorSanitizer

2022-12-09 Thread Andrew Haley
On Fri, 9 Dec 2022 14:16:19 GMT, Robbin Ehn wrote: > > What version of GCC are you using? > > gcc 11.3 with libubsan 11.2 > > Also it seem to big overlap with -Wcast-align(=strict) for the > warnings/errors I see and I do like that warning. Do you have an idea if the > coverage are pretty

Integrated: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator)

2022-12-07 Thread Andrew Haley
On Wed, 2 Nov 2022 16:23:34 GMT, Andrew Haley wrote: > JEP 429 implementation. This pull request has now been integrated. Changeset: 221e1a42 Author: Andrew Haley Committer: Alan Bateman URL: https://git.openjdk.org/jdk/commit/221e1a426070088b819ddc37b7ca77d9d8626eb4 St

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v38]

2022-12-06 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 71 commits: - Merge from JDK mainline - Add comment - Merge https://github.com/openjdk/jdk into JDK-828 - Feedback from review

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v37]

2022-12-05 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Add comment - Changes: - all: https://git.openjdk.org/jdk/pull/10952/files - new: https://git.openjdk.org/jdk/pull/10952/files/702d7

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v36]

2022-12-05 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 69 commits: - Merge https://github.com/openjdk/jdk into JDK-828 - Feedback from reviewers - Feedback from reviewers - Unused varia

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v35]

2022-12-01 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Feedback from reviewers - Changes: - all: https://git.openjdk.org/jdk/pull/10952/files - new: https://git.openjdk.org/jdk/pull/10952/fi

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v33]

2022-12-01 Thread Andrew Haley
On Wed, 30 Nov 2022 21:47:47 GMT, Dean Long wrote: >> Andrew Haley has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Unused variable > > src/hotspot/share/prims/jvm.cpp line 1385: > >> 138

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v34]

2022-12-01 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Feedback from reviewers - Changes: - all: https://git.openjdk.org/jdk/pull/10952/files - new: https://git.openjdk.org/jdk/pull/10952/fi

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v33]

2022-12-01 Thread Andrew Haley
On Wed, 30 Nov 2022 21:39:40 GMT, Dean Long wrote: >> Andrew Haley has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Unused variable > > src/hotspot/share/classfile/javaClasses.cpp line 1731: > &

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v33]

2022-12-01 Thread Andrew Haley
On Wed, 30 Nov 2022 21:34:59 GMT, Dean Long wrote: >> Andrew Haley has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Unused variable > > src/hotspot/cpu/aarch64/aarch64.ad line 3635: > >> 3633:

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v33]

2022-11-29 Thread Andrew Haley
On Thu, 24 Nov 2022 14:05:41 GMT, Andrew Haley wrote: >> JEP 429 implementation. > > Andrew Haley has updated the pull request incrementally with one additional > commit since the last revision: > > Unused variable src/jdk.incubator.concurrent/share/classes/jdk

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v33]

2022-11-24 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Unused variable - Changes: - all: https://git.openjdk.org/jdk/pull/10952/files - new: https://git.openjdk.org/jdk/pull/10952/files/1b3c3

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v32]

2022-11-24 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Cleanup - Changes: - all: https://git.openjdk.org/jdk/pull/10952/files - new: https://git.openjdk.org/jdk/pull/10952/files/903780d6..1b3c3

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v31]

2022-11-24 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Cleanup - Changes: - all: https://git.openjdk.org/jdk/pull/10952/files - new: https://git.openjdk.org/jdk/pull/10952/files/15db2a30..90378

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v30]

2022-11-24 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with five additional commits since the last revision: - Merge branch 'JDK-828' of https://github.com/theRealAph/jdk into JDK-828 - Update src/jdk.incubator.concurrent/share/classes/jdk/incuba

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v29]

2022-11-24 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Update src/jdk.incubator.concurrent/share/classes/jdk/incubator/concurrent/ScopedValue.java Co-authored-by: Paul Sandoz - Changes: -

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v25]

2022-11-24 Thread Andrew Haley
On Wed, 23 Nov 2022 18:47:28 GMT, Paul Sandoz wrote: >> Andrew Haley has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 52 commits: >> >> - Merge master >> - javadoc >> - Feedback from revi

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v28]

2022-11-24 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Reviewer feedback - Changes: - all: https://git.openjdk.org/jdk/pull/10952/files - new: https://git.openjdk.org/jdk/pull/10952/files/3a6f8

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v27]

2022-11-24 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with two additional commits since the last revision: - Merge branch 'JDK-828' of https://github.com/theRealAph/jdk into JDK-828 - Fix merge - Changes: - all: https://git.openjdk.org/

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v25]

2022-11-24 Thread Andrew Haley
On Wed, 23 Nov 2022 18:49:07 GMT, Paul Sandoz wrote: >> Andrew Haley has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 52 commits: >> >> - Merge master >> - javadoc >> - Feedback from revi

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v25]

2022-11-24 Thread Andrew Haley
On Wed, 23 Nov 2022 19:16:23 GMT, Paul Sandoz wrote: > Looks good (just some last minor comments). I did not focus on the tests, nor > too closely at all of the HotSpot changes. > > Something for future investigation perhaps (if not already thought about): > consider using a persistent map, a

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v26]

2022-11-24 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with two additional commits since the last revision: - Update src/jdk.incubator.concurrent/share/classes/jdk/incubator/concurrent/ScopedValue.java Co-authored-by: Paul Sandoz - Update

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v25]

2022-11-23 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 52 commits: - Merge master - javadoc - Feedback from reviewers - Update src/hotspot/share/classfile/vmSymbols.hpp - Merge branch 'JDK-8286

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v11]

2022-11-23 Thread Andrew Haley
On Fri, 18 Nov 2022 15:19:35 GMT, Alan Bateman wrote: >> Andrew Haley has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Reviewer feedback > > src/java.base/share/classes/java/lang/Thread.jav

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v24]

2022-11-23 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: javadoc - Changes: - all: https://git.openjdk.org/jdk/pull/10952/files - new: https://git.openjdk.org/jdk/pull/10952/files/7ac61ba2..8c526

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v23]

2022-11-23 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Feedback from reviewers - Changes: - all: https://git.openjdk.org/jdk/pull/10952/files - new: https://git.openjdk.org/jdk/pull/10952/fi

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v21]

2022-11-23 Thread Andrew Haley
On Tue, 22 Nov 2022 17:34:22 GMT, Andrew Haley wrote: >> JEP 429 implementation. > > Andrew Haley has updated the pull request incrementally with three additional > commits since the last revision: > > - Merge branch 'JDK-828' of https://github.com/theRealAph/jd

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v22]

2022-11-23 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Update src/hotspot/share/classfile/vmSymbols.hpp - Changes: - all: https://git.openjdk.org/jdk/pull/10952/files - new: ht

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v6]

2022-11-23 Thread Andrew Haley
On Wed, 16 Nov 2022 13:13:59 GMT, Alan Bateman wrote: >> Note that `ScopedValue` can currently be bound to `null`, but by using >> `Optional`, there would be no way to differentiate an unbound `ScopedValue` >> from one bound to `null`. > >> Note that `ScopedValue` can currently be bound to 

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v15]

2022-11-23 Thread Andrew Haley
On Fri, 18 Nov 2022 17:31:30 GMT, Alan Bateman wrote: >> Andrew Haley has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Reviewer feedback >> - Reviewer feedback Javadoc fixes > > src/java.base/shar

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v21]

2022-11-22 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with three additional commits since the last revision: - Merge branch 'JDK-828' of https://github.com/theRealAph/jdk into JDK-828 - Update src/java.base/share/classes/java/lang/VirtualThread.j

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v20]

2022-11-22 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Update src/java.base/share/classes/java/lang/Thread.java Co-authored-by: ExE Boss <3889017+exe-b...@users.noreply.github.com> -

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v19]

2022-11-22 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Update src/hotspot/cpu/aarch64/aarch64.ad Co-authored-by: ExE Boss <3889017+exe-b...@users.noreply.github.com> - Changes: - a

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v18]

2022-11-22 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Remove incorrect assertion. - Changes: - all: https://git.openjdk.org/jdk/pull/10952/files - new: https://git.openjdk.org/jdk/pull/10

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v17]

2022-11-22 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with two additional commits since the last revision: - Merge branch 'JDK-828' of https://github.com/theRealAph/jdk into JDK-828 - Fix bad merge. - Changes: - all: https://git.openjdk.

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v16]

2022-11-18 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Add ensureMaterializedForStackWalk kludge for AArch64 - Changes: - all: https://git.openjdk.org/jdk/pull/10952/files - new: ht

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v15]

2022-11-18 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with two additional commits since the last revision: - Reviewer feedback - Reviewer feedback Javadoc fixes - Changes: - all: https://git.openjdk.org/jdk/pull/10952/files - new: ht

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v10]

2022-11-18 Thread Andrew Haley
On Thu, 17 Nov 2022 20:18:42 GMT, Paul Sandoz wrote: >> Andrew Haley has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Javadoc changes. >> - ProblemList.txt cleanup > > src/jdk.incubator.co

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v14]

2022-11-18 Thread Andrew Haley
On Wed, 16 Nov 2022 19:04:29 GMT, Andrew Haley wrote: >> Probably so, yes. I'll have a look at that along with caching failure. > > So I just did the experiment of caching failures and the result of > `isBound()`. > > This test: > > > @Benchmark > @Ou

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v14]

2022-11-18 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with two additional commits since the last revision: - Merge branch 'JDK-828' of https://github.com/theRealAph/jdk into JDK-828 - Reviewer feedback - Changes: - all: ht

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v13]

2022-11-18 Thread Andrew Haley
> JEP 429 implementation. Andrew Haley has updated the pull request incrementally with one additional commit since the last revision: Update src/jdk.incubator.concurrent/share/classes/jdk/incubator/concurrent/StructuredTaskScope.java Co-authored-by: Alan Bateman - Chan

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v10]

2022-11-18 Thread Andrew Haley
On Thu, 17 Nov 2022 18:58:11 GMT, Andrew Haley wrote: >> src/hotspot/share/utilities/exceptions.cpp line 166: >> >>> 164: // Remove the ScopedValue cache in case we got a virtual machine >>> 165: // Error while we were trying to manipulate ScopedValue

  1   2   >