Integrated: 8292407: Improve Weak CAS VarHandle/Unsafe tests resilience under spurious failures

2022-09-01 Thread Aleksey Shipilev
On Tue, 16 Aug 2022 08:23:11 GMT, Aleksey Shipilev wrote: > We have a few reports that existing Weak* VarHandle tests are still flaky, > for example on large AArch64 machines or small RISC-V machines. > > The flakiness is intrinsic to the nature of Weak* operations under tests,

Re: RFR: 8292407: Improve Weak CAS VarHandle/Unsafe tests resilience under spurious failures [v7]

2022-09-01 Thread Aleksey Shipilev
On Tue, 30 Aug 2022 14:18:11 GMT, Aleksey Shipilev wrote: >> We have a few reports that existing Weak* VarHandle tests are still flaky, >> for example on large AArch64 machines or small RISC-V machines. >> >> The flakiness is intrinsic to the nature of Weak* operatio

Re: RFR: 8292407: Improve Weak CAS VarHandle/Unsafe tests resilience under spurious failures [v4]

2022-08-31 Thread Aleksey Shipilev
On Mon, 22 Aug 2022 17:43:43 GMT, Paul Sandoz wrote: >> Aleksey Shipilev has updated the pull request with a new target base due to >> a merge or a rebase. The pull request now contains six commits: >> >> - Rework timeouts >> - Merge branch 'master' i

Integrated: 8293020: jmod should not be treated as "small" tool for large modules

2022-08-30 Thread Aleksey Shipilev
On Mon, 29 Aug 2022 10:13:29 GMT, Aleksey Shipilev wrote: > This is similar to > [JDK-8245168](https://bugs.openjdk.org/browse/JDK-8245168), but the blanket > change to allow all modules be compiled with default options is a net loss. > Instead, we can hand-pick the major offe

Re: RFR: 8293020: jmod should not be treated as "small" tool for large modules [v3]

2022-08-30 Thread Aleksey Shipilev
On Mon, 29 Aug 2022 18:01:36 GMT, Aleksey Shipilev wrote: >> This is similar to >> [JDK-8245168](https://bugs.openjdk.org/browse/JDK-8245168), but the blanket >> change to allow all modules be compiled with default options is a net loss. >> Instead, we can hand-pick th

Re: RFR: 8292407: Improve Weak CAS VarHandle/Unsafe tests resilience under spurious failures [v7]

2022-08-30 Thread Aleksey Shipilev
On Tue, 30 Aug 2022 14:18:11 GMT, Aleksey Shipilev wrote: >> We have a few reports that existing Weak* VarHandle tests are still flaky, >> for example on large AArch64 machines or small RISC-V machines. >> >> The flakiness is intrinsic to the nature of Weak* operatio

Re: RFR: 8292407: Improve Weak CAS VarHandle/Unsafe tests resilience under spurious failures [v7]

2022-08-30 Thread Aleksey Shipilev
xploding test time in worst cases. Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 12 commits: - Rewind back to 100 attempts, 1ms delay - Merge branch 'master' into JDK-8292407-varhandle-weak-resilien

Re: RFR: 8293017: Improve hash calculation parallelism in jmod/jlink [v2]

2022-08-29 Thread Aleksey Shipilev
On Mon, 29 Aug 2022 09:33:44 GMT, Сергей Цыпанов wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Touchups > > src/java.base/share/classes/jdk/internal/module/ModuleHashes.java l

Re: RFR: 8293017: Improve hash calculation parallelism in jmod/jlink

2022-08-29 Thread Aleksey Shipilev
On Mon, 29 Aug 2022 09:18:16 GMT, Alan Bateman wrote: > This issue will require discussion as it potentially impacts usage at > run-time when the resolver runs at startup or when creating module layers. Startup with/without CDS: $ perf stat -r 100 build/linux-x86_64-server-release/images/jdk

Re: RFR: 8293017: Improve hash calculation parallelism in jmod/jlink [v2]

2022-08-29 Thread Aleksey Shipilev
Additional testing: > - [x] Linux x86_64 fastdebug, `java/util/jar` > - [x] Linux x86_64 fastdebug, `tools/jmod` > - [x] Linux x86_64 fastdebug, `tools/jlink` > - [x] Linux x86_64 fastdebug `tier1` Aleksey Shipilev has updated the pull request incrementally with one additional

RFR: 8293017: Improve hash calculation parallelism in jmod/jlink

2022-08-29 Thread Aleksey Shipilev
`jmod`/`jlink` are executed during build time to produce the `jmod` and the base modules image. On slow hardware (Raspberry Pi -class, for example) and/or slow VMs (debug, interpreter-only, for example) this takes a while. Profiling shows the considerable time is spent on hashing modules either

Integrated: 8292983: ModuleReferenceImpl.computeHash should record algorithm for cache checks

2022-08-28 Thread Aleksey Shipilev
On Fri, 26 Aug 2022 13:55:22 GMT, Aleksey Shipilev wrote: > Look at implementation and figure out what happens if you do: > > > computeHash("SHA-1") = someHash; > computeHash("SHA-256") = ...? > > > The caching method should actually check the al

Re: RFR: 8292983: ModuleReferenceImpl.computeHash should record algorithm for cache checks [v4]

2022-08-28 Thread Aleksey Shipilev
On Fri, 26 Aug 2022 15:06:16 GMT, Aleksey Shipilev wrote: >> Look at implementation and figure out what happens if you do: >> >> >> computeHash("SHA-1") = someHash; >> computeHash("SHA-256") = ...? >> >> >> The caching me

Re: RFR: 8292983: ModuleReferenceImpl.computeHash should record algorithm for cache checks [v3]

2022-08-26 Thread Aleksey Shipilev
On Fri, 26 Aug 2022 14:54:22 GMT, Alan Bateman wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Review comments > > src/java.base/share/classes/jdk/internal/module/ModuleReference

Re: RFR: 8292983: ModuleReferenceImpl.computeHash should record algorithm for cache checks [v4]

2022-08-26 Thread Aleksey Shipilev
nce only use SHA-256 today, but this is a landmine > ready to fire. > > Additional testing: > - [x] Linux x86_64 release, `java/lang/module` tests Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision: Comments -

Re: RFR: 8292983: ModuleReferenceImpl.computeHash should record algorithm for cache checks [v3]

2022-08-26 Thread Aleksey Shipilev
On Fri, 26 Aug 2022 14:33:33 GMT, Alan Bateman wrote: > Can you make sure that you run all jar, jmod and jlink tests? Module hashes > are generated at packaging time, then checked when generating the > configuration in early startup. `java/util/jar`, `jdk/tools/jmod`, `jdk/tools/jlink` -- all

Re: RFR: 8292983: ModuleReferenceImpl.computeHash should record algorithm for cache checks [v3]

2022-08-26 Thread Aleksey Shipilev
On Fri, 26 Aug 2022 14:06:21 GMT, Alan Bateman wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Review comments > > src/java.base/share/classes/jdk/internal/module/ModuleReference

Re: RFR: 8292983: ModuleReferenceImpl.computeHash should record algorithm for cache checks [v2]

2022-08-26 Thread Aleksey Shipilev
On Fri, 26 Aug 2022 14:14:12 GMT, Alan Bateman wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Touchups > > src/java.base/share/classes/jdk/internal/module/ModuleReference

Re: RFR: 8292983: ModuleReferenceImpl.computeHash should record algorithm for cache checks [v3]

2022-08-26 Thread Aleksey Shipilev
nce only use SHA-256 today, but this is a landmine > ready to fire. > > Additional testing: > - [x] Linux x86_64 release, `java/lang/module` tests Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision: Review comments -

Re: RFR: 8292983: ModuleReferenceImpl.computeHash should record algorithm for cache checks [v2]

2022-08-26 Thread Aleksey Shipilev
On Fri, 26 Aug 2022 14:06:30 GMT, Alan Bateman wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Touchups > > src/java.base/share/classes/jdk/internal/module/ModuleReferenceIm

Re: RFR: 8292983: ModuleReferenceImpl.computeHash should record algorithm for cache checks [v2]

2022-08-26 Thread Aleksey Shipilev
nce only use SHA-256 today, but this is a landmine > ready to fire. > > Additional testing: > - [x] Linux x86_64 release, `java/lang/module` tests Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision: Touchups -

RFR: 8292983: ModuleReferenceImpl.computeHash ignores the algorithm for cache checks

2022-08-26 Thread Aleksey Shipilev
Look at implementation and figure out what happens if you do: computeHash("SHA-1") = someHash; computeHash("SHA-256") = ...? The caching method should actually check the algorithms match. Does not seem to be a problem at this point, since we seem to be only calling that methods with "SHA-25

Re: RFR: 8292407: Improve Weak CAS VarHandle/Unsafe tests resilience under spurious failures [v6]

2022-08-25 Thread Aleksey Shipilev
xploding test time in worst cases. Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 10 commits: - Merge branch 'master' into JDK-8292407-varhandle-weak-resilient - Pull Handles.get out of the weak retry

Integrated: 8292877: java/util/concurrent/atomic/Serial.java uses {Double,Long}Accumulator incorrectly

2022-08-25 Thread Aleksey Shipilev
On Wed, 24 Aug 2022 18:15:17 GMT, Aleksey Shipilev wrote: > [JDK-8026344](https://bugs.openjdk.org/browse/JDK-8026344) added tests that > subtly contradict the contract for `{Double,Long}Accumulator`-s, which breaks > the tests on some platforms even in the single-threaded case. >

Re: RFR: 8292877: java/util/concurrent/atomic/Serial.java uses {Double,Long}Accumulator incorrectly

2022-08-25 Thread Aleksey Shipilev
On Wed, 24 Aug 2022 18:15:17 GMT, Aleksey Shipilev wrote: > [JDK-8026344](https://bugs.openjdk.org/browse/JDK-8026344) added tests that > subtly contradict the contract for `{Double,Long}Accumulator`-s, which breaks > the tests on some platforms even in the single-threaded case. >

RFR: 8292877: java/util/concurrent/atomic/Serial.java uses {Double,Long}Accumulator incorrectly

2022-08-24 Thread Aleksey Shipilev
[JDK-8026344](https://bugs.openjdk.org/browse/JDK-8026344) added tests that subtly contradict the contract for `{Double,Long}Accumulator`-s, which breaks the tests on some platforms even in the single-threaded case. They use accumulators with binary plus as update function and using non-zero va

Re: RFR: 8292407: Improve Weak CAS VarHandle/Unsafe tests resilience under spurious failures [v5]

2022-08-23 Thread Aleksey Shipilev
xploding test time in worst cases. Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains ten commits: - Pull Handles.get out of the weak retry loop - Drop weakDelay to 1 - Merge branch 'master' into JDK-8292407-

Re: RFR: 8292407: Improve Weak CAS VarHandle/Unsafe tests resilience under spurious failures [v4]

2022-08-22 Thread Aleksey Shipilev
On Fri, 19 Aug 2022 18:14:16 GMT, Aleksey Shipilev wrote: >> We have a few reports that existing Weak* VarHandle tests are still flaky, >> for example on large AArch64 machines or small RISC-V machines. >> >> The flakiness is intrinsic to the nature of Weak* operatio

Re: RFR: 8292215: java/util/stream/boottest/java.base/java/util/stream/SpinedBufferTest.java times out with slowdebug [v3]

2022-08-22 Thread Aleksey Shipilev
On Mon, 22 Aug 2022 18:03:21 GMT, Daniel D. Daugherty wrote: >> Split the java/util/stream/SpinedBufferTest.java test into two parts: >> - java/util/stream/SpinedBufferTest1.java has the first 6 test cases >> - java/util/stream/SpinedBufferTes2.java has the second 6 test cases >> >> I couldn't

Re: RFR: 8292407: Improve Weak CAS VarHandle/Unsafe tests resilience under spurious failures [v4]

2022-08-22 Thread Aleksey Shipilev
On Mon, 22 Aug 2022 16:49:34 GMT, Martin Doerr wrote: > My concern is that we may not notice implementation problems any more when > retrying so often. Accidental cache line sharing should better get fixed in > the tests if possible. Context switching or cache capacity limits may cause 1 > fai

Re: RFR: 8292407: Improve Weak CAS VarHandle/Unsafe tests resilience under spurious failures [v4]

2022-08-22 Thread Aleksey Shipilev
On Mon, 22 Aug 2022 13:12:25 GMT, Martin Doerr wrote: > In general, I appreciate making these tests more resilient. However, I wonder > about such large numbers for retry attempts. Smells like more than just > sporadic failures. Are we sure there is no bug which causes more failures? > Does it

Re: RFR: 8292407: Improve Weak CAS VarHandle/Unsafe tests resilience under spurious failures [v4]

2022-08-22 Thread Aleksey Shipilev
On Fri, 19 Aug 2022 18:14:16 GMT, Aleksey Shipilev wrote: >> We have a few reports that existing Weak* VarHandle tests are still flaky, >> for example on large AArch64 machines or small RISC-V machines. >> >> The flakiness is intrinsic to the nature of Weak* operatio

Re: RFR: 8292407: Improve Weak CAS VarHandle/Unsafe tests resilience under spurious failures [v4]

2022-08-22 Thread Aleksey Shipilev
On Fri, 19 Aug 2022 18:14:16 GMT, Aleksey Shipilev wrote: >> We have a few reports that existing Weak* VarHandle tests are still flaky, >> for example on large AArch64 machines or small RISC-V machines. >> >> The flakiness is intrinsic to the nature of Weak* operatio

Re: RFR: 8292215: java/util/stream/boottest/java.base/java/util/stream/SpinedBufferTest.java times out with slowdebug [v2]

2022-08-22 Thread Aleksey Shipilev
On Sat, 20 Aug 2022 02:41:50 GMT, Daniel D. Daugherty wrote: >> Split the java/util/stream/SpinedBufferTest.java test into two parts: >> - java/util/stream/SpinedBufferTest1.java has the first 6 test cases >> - java/util/stream/SpinedBufferTes2.java has the second 6 test cases >> >> I couldn't

Re: RFR: 8292407: Improve Weak CAS VarHandle/Unsafe tests resilience under spurious failures [v4]

2022-08-19 Thread Aleksey Shipilev
xploding test time in worst cases. Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains six commits: - Rework timeouts - Merge branch 'master' into JDK-8292407-varhandle-weak-resilient - Merge branch 'm

Re: RFR: 8292215: java/util/stream/boottest/java.base/java/util/stream/SpinedBufferTest.java times out with slowdebug

2022-08-19 Thread Aleksey Shipilev
On Thu, 11 Aug 2022 20:09:06 GMT, Daniel D. Daugherty wrote: > Split the java/util/stream/SpinedBufferTest.java test into two parts: > - java/util/stream/SpinedBufferTest1.java has the first 6 test cases > - java/util/stream/SpinedBufferTes2.java has the second 6 test cases > > I couldn't figur

Re: RFR: 8292407: Improve Weak CAS VarHandle/Unsafe tests resilience under spurious failures [v3]

2022-08-17 Thread Aleksey Shipilev
xploding test time in worst cases. Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits: - Merge branch 'master' into JDK-8292407-varhandle-weak-resilient - Update copyrights - Also do Unsafe

Integrated: 8292443: Weak CAS VarHandle/Unsafe tests should test always-failing cases

2022-08-17 Thread Aleksey Shipilev
On Tue, 16 Aug 2022 15:06:50 GMT, Aleksey Shipilev wrote: > I noticed that current VarHandle/Unsafe test cases do not test the > always-failing cases. Strong CASes do test both always-success and > always-failing scenarios, while weak CASes only test spurious-failure tests. >

Re: RFR: 8292443: Weak CAS VarHandle/Unsafe tests should test always-failing cases

2022-08-17 Thread Aleksey Shipilev
On Tue, 16 Aug 2022 15:06:50 GMT, Aleksey Shipilev wrote: > I noticed that current VarHandle/Unsafe test cases do not test the > always-failing cases. Strong CASes do test both always-success and > always-failing scenarios, while weak CASes only test spurious-failure tests. >

Integrated: 8292352: 32-bit Windows build failures after JDK-8290059

2022-08-17 Thread Aleksey Shipilev
On Mon, 15 Aug 2022 11:16:06 GMT, Aleksey Shipilev wrote: > The affected file was added by > [JDK-8290059](https://bugs.openjdk.org/browse/JDK-8290059), and the code that > fails the compilation is under `#ifdef _WIN32`, and it only (?) gets compiled > for tests. Looks like we rea

Integrated: 8289049: x86_32 build fails with GCC 11 due to newString646_US warning

2022-08-17 Thread Aleksey Shipilev
On Mon, 1 Aug 2022 11:46:52 GMT, Aleksey Shipilev wrote: > See bug report for reproducer and error message. The warning looks quite > superficial, and I initially suspected that it complains about `int len = > (int)strlen(str)` cast of `size_t`. But what is confusing is nearly the

Re: RFR: 8289049: x86_32 build fails with GCC 11 due to newString646_US warning [v3]

2022-08-17 Thread Aleksey Shipilev
On Mon, 15 Aug 2022 13:56:38 GMT, Aleksey Shipilev wrote: >> See bug report for reproducer and error message. The warning looks quite >> superficial, and I initially suspected that it complains about `int len = >> (int)strlen(str)` cast of `size_t`. But what is confu

Re: RFR: 8289049: x86_32 build fails with GCC 11 due to newString646_US warning [v3]

2022-08-17 Thread Aleksey Shipilev
On Wed, 17 Aug 2022 08:55:58 GMT, Thomas Stuefe wrote: > I'm confused. How does adding EnsureCapacity in newString646_US fix the > compiler warning mentioned in JBS? I think this is a bona-fide compiler static analyzer bug. GCC 12 compiles this code fine. So, we have two options: a) disable th

Re: RFR: 8292443: Weak CAS VarHandle/Unsafe tests should test always-failing cases

2022-08-17 Thread Aleksey Shipilev
On Tue, 16 Aug 2022 15:06:50 GMT, Aleksey Shipilev wrote: > I noticed that current VarHandle/Unsafe test cases do not test the > always-failing cases. Strong CASes do test both always-success and > always-failing scenarios, while weak CASes only test spurious-failure tests. >

Re: RFR: 8289049: x86_32 build fails with GCC 11 due to newString646_US warning [v3]

2022-08-17 Thread Aleksey Shipilev
On Mon, 15 Aug 2022 13:56:38 GMT, Aleksey Shipilev wrote: >> See bug report for reproducer and error message. The warning looks quite >> superficial, and I initially suspected that it complains about `int len = >> (int)strlen(str)` cast of `size_t`. But what is confu

Re: RFR: 8292352: 32-bit Windows build failures after JDK-8290059

2022-08-17 Thread Aleksey Shipilev
On Mon, 15 Aug 2022 11:16:06 GMT, Aleksey Shipilev wrote: > The affected file was added by > [JDK-8290059](https://bugs.openjdk.org/browse/JDK-8290059), and the code that > fails the compilation is under `#ifdef _WIN32`, and it only (?) gets compiled > for tests. Looks like we rea

Re: RFR: 8292407: Improve Weak CAS VarHandle/Unsafe tests resilience under spurious failures [v2]

2022-08-16 Thread Aleksey Shipilev
xploding test time in worst cases. Aleksey Shipilev has updated the pull request incrementally with two additional commits since the last revision: - Update copyrights - Also do Unsafe tests - Changes: - all: https://git.openjdk.org/jdk/pull/9889/files - new: https://gi

RFR: 8292443: Weak CAS VarHandle/Unsafe tests should test always-failing cases

2022-08-16 Thread Aleksey Shipilev
I noticed that current VarHandle/Unsafe test cases do not test the always-failing cases. Strong CASes do test both always-success and always-failing scenarios, while weak CASes only test spurious-failure tests. We should be also testing always-failing cases for these. Weak CAS can spuriously fa

RFR: 8292407: Improve Weak* VarHandle tests resilience under spurious failures

2022-08-16 Thread Aleksey Shipilev
We have a few reports that existing Weak* VarHandle tests are still flaky, for example on large AArch64 machines or small RISC-V machines. The flakiness is intrinsic to the nature of Weak* operations under tests, that can spuriously fail. The last attempt to fix these was [JDK-8155739](https://

RFR: 8292352: 32-bit Windows build failures after JDK-8290059

2022-08-16 Thread Aleksey Shipilev
The affected file was added by [JDK-8290059](https://bugs.openjdk.org/browse/JDK-8290059), and the code that fails the compilation is under `#ifdef _WIN32`, and it only (?) gets compiled for tests. Looks like we really need the "WINAPI" macro in the definition, so that we match the stdcall. See

Re: RFR: 8292352: 32-bit Windows build failures after JDK-8290059

2022-08-16 Thread Aleksey Shipilev
On Mon, 15 Aug 2022 11:16:06 GMT, Aleksey Shipilev wrote: > The affected file was added by > [JDK-8290059](https://bugs.openjdk.org/browse/JDK-8290059), and the code that > fails the compilation is under `#ifdef _WIN32`, and it only (?) gets compiled > for tests. Looks like we rea

Re: RFR: 8289049: x86_32 build fails with GCC 11 due to newString646_US warning [v2]

2022-08-15 Thread Aleksey Shipilev
On Mon, 15 Aug 2022 13:21:49 GMT, Alan Bateman wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Init buf in newStringCp1252 > > src/java.base/share/native/libjava/jni_util.c

Re: RFR: 8289049: x86_32 build fails with GCC 11 due to newString646_US warning [v3]

2022-08-15 Thread Aleksey Shipilev
implementation to dodge > it. > > Additional testing: > - [x] Linux x86_32 build with GCC 11 > - [x] Linux x86_32 `tier1` test with GCC 9 > - [x] Linux x86_64 `tier1` test with GCC 9 Aleksey Shipilev has updated the pull request with a new target base due to a merge or a r

Re: RFR: 8289049: x86_32 build fails with GCC 11 due to newString646_US warning [v2]

2022-08-15 Thread Aleksey Shipilev
On Mon, 1 Aug 2022 14:50:48 GMT, Aleksey Shipilev wrote: >> See bug report for reproducer and error message. The warning looks quite >> superficial, and I initially suspected that it complains about `int len = >> (int)strlen(str)` cast of `size_t`. But what is confu

Re: RFR: 8283276: java/io/ObjectStreamClass/ObjectStreamClassCaching.java fails with various GCs [v3]

2022-08-03 Thread Aleksey Shipilev
On Wed, 3 Aug 2022 22:17:38 GMT, Peter Levart wrote: >> This is a continuation of effort from >> https://github.com/openjdk/jdk/pull/9533 to fix the ObjectStreamClassCaching >> test which is failing with various GCs != G1. The test class contains 2 test >> methods: >> - test2CacheReleaseUnderM

Re: RFR: 8283276: java/io/ObjectStreamClass/ObjectStreamClassCaching.java fails with various GCs [v2]

2022-08-03 Thread Aleksey Shipilev
On Wed, 3 Aug 2022 06:24:16 GMT, Peter Levart wrote: >> This is a continuation of effort from >> https://github.com/openjdk/jdk/pull/9533 to fix the ObjectStreamClassCaching >> test which is failing with various GCs != G1. The test class contains 2 test >> methods: >> - test2CacheReleaseUnderM

Re: RFR: 8289049: x86_32 build fails with GCC 11 due to newString646_US warning [v2]

2022-08-01 Thread Aleksey Shipilev
implementation to dodge > it. > > Additional testing: > - [x] Linux x86_32 build with GCC 11 > - [x] Linux x86_32 `tier1` test with GCC 9 > - [ ] Linux x86_64 `tier1` test with GCC 9 Aleksey Shipilev has updated the pull request incrementally with one additional comm

Integrated: 8290531: Loom: Parallelize a few tests more deeply

2022-08-01 Thread Aleksey Shipilev
On Tue, 19 Jul 2022 12:52:11 GMT, Aleksey Shipilev wrote: > Some of the newly added Loom tests are long-running, and thus they delay the > completion of otherwise very parallel tier1/jdk_loom. We can parallelize them > a bit better to avoid these testing stalls. > > Improv

Re: RFR: 8290531: Loom: Parallelize a few tests more deeply [v2]

2022-08-01 Thread Aleksey Shipilev
On Mon, 1 Aug 2022 08:37:11 GMT, Aleksey Shipilev wrote: >> Some of the newly added Loom tests are long-running, and thus they delay the >> completion of otherwise very parallel tier1/jdk_loom. We can parallelize >> them a bit better to avoid these testing stalls. >>

RFR: 8289049: x86_32 build fails with GCC 11 due to newString646_US warning

2022-08-01 Thread Aleksey Shipilev
See bug report for reproducer and error message. The warning looks quite superficial, and I initially suspected that it complains about `int len = (int)strlen(str)` cast of `size_t`. But what is confusing is nearly the similar code in `newStringCp1252` apparently does not produce the warning:

Re: RFR: 8290531: Loom: Parallelize a few tests more deeply

2022-08-01 Thread Aleksey Shipilev
On Mon, 1 Aug 2022 07:43:57 GMT, Alan Bateman wrote: > No objection to changing these tests. Did the changes in new commit. - PR: https://git.openjdk.org/jdk/pull/9554

Re: RFR: 8290531: Loom: Parallelize a few tests more deeply [v2]

2022-08-01 Thread Aleksey Shipilev
tdebug after > real 4m9.249s; -26% > user 67m21.940s > sys 1m57.625s Aleksey Shipilev 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 four

Re: RFR: 8290531: Loom: Parallelize a few tests more deeply

2022-08-01 Thread Aleksey Shipilev
On Tue, 19 Jul 2022 12:52:11 GMT, Aleksey Shipilev wrote: > Some of the newly added Loom tests are long-running, and thus they delay the > completion of otherwise very parallel tier1/jdk_loom. We can parallelize them > a bit better to avoid these testing stalls. > > Improv

Withdrawn: 8283276: java/io/ObjectStreamClass/ObjectStreamClassCaching.java fails with various GCs

2022-07-28 Thread Aleksey Shipilev
On Mon, 18 Jul 2022 07:40:53 GMT, Aleksey Shipilev wrote: > Test appears to pass fine with G1. But it fails with other GCs, for example > Parallel, Shenandoah, etc, it fails: > > > $ CONF=linux-x86_64-server-fastdebug make test > TEST=java/io/ObjectStreamClass/ObjectStrea

Re: RFR: 8283276: java/io/ObjectStreamClass/ObjectStreamClassCaching.java fails with various GCs

2022-07-28 Thread Aleksey Shipilev
On Mon, 18 Jul 2022 07:40:53 GMT, Aleksey Shipilev wrote: > Test appears to pass fine with G1. But it fails with other GCs, for example > Parallel, Shenandoah, etc, it fails: > > > $ CONF=linux-x86_64-server-fastdebug make test > TEST=java/io/ObjectStreamClass/ObjectStrea

Re: RFR: 8283276: java/io/ObjectStreamClass/ObjectStreamClassCaching.java fails with various GCs

2022-07-28 Thread Aleksey Shipilev
On Wed, 27 Jul 2022 12:30:43 GMT, Aleksey Shipilev wrote: >>> ...I can take this over, unless you want to do it, Aleksey? >> >> I find it dubious to try and guess what GCs would do with non-strong refs, >> but feel free. Don't reassign the bug yet, just see how

Re: RFR: 8283276: java/io/ObjectStreamClass/ObjectStreamClassCaching.java fails with various GCs

2022-07-27 Thread Aleksey Shipilev
On Mon, 25 Jul 2022 16:41:04 GMT, Aleksey Shipilev wrote: > > ...I can take this over, unless you want to do it, Aleksey? > > I find it dubious to try and guess what GCs would do with non-strong refs, > but feel free. Don't reassign the bug yet, just see how messy that wou

Re: RFR: 8290531: Loom: Parallelize a few tests more deeply

2022-07-26 Thread Aleksey Shipilev
On Tue, 26 Jul 2022 10:16:31 GMT, Jaikiran Pai wrote: >> test/jdk/java/nio/channels/vthread/BlockingChannelOps.java line 36: >> >>> 34: * @test id=useDirectRegister >>> 35: * @bug 8284161 >>> 36: * @summary Basic tests of virtual threads doing blocking I/O with NIO >>> channels >> >> Hello

Re: RFR: 8290531: Loom: Parallelize a few tests more deeply

2022-07-26 Thread Aleksey Shipilev
On Tue, 19 Jul 2022 12:52:11 GMT, Aleksey Shipilev wrote: > Some of the newly added Loom tests are long-running, and thus they delay the > completion of otherwise very parallel tier1/jdk_loom. We can parallelize them > a bit better to avoid these testing stalls. > > Improv

Re: RFR: 8283276: java/io/ObjectStreamClass/ObjectStreamClassCaching.java fails with various GCs

2022-07-25 Thread Aleksey Shipilev
On Mon, 25 Jul 2022 14:51:32 GMT, Peter Levart wrote: > ...I can take this over, unless you want to do it, Aleksey? I find it dubious to try and guess what GCs would do with non-strong refs, but feel free. Don't reassign the bug yet, just see how messy that would be? - PR: https:/

Re: RFR: 8283276: java/io/ObjectStreamClass/ObjectStreamClassCaching.java fails with various GCs

2022-07-25 Thread Aleksey Shipilev
On Mon, 25 Jul 2022 13:04:46 GMT, Peter Levart wrote: > Just a note that the failing test is not about checking that cache is cleared > after plain System.gc(), but about checking that cache is NOT cleared after > System.gc() when there was no real memory pressure. The cache uses > SoftReferen

Re: RFR: 8283276: java/io/ObjectStreamClass/ObjectStreamClassCaching.java fails with various GCs

2022-07-25 Thread Aleksey Shipilev
On Mon, 18 Jul 2022 07:40:53 GMT, Aleksey Shipilev wrote: > Test appears to pass fine with G1. But it fails with other GCs, for example > Parallel, Shenandoah, etc, it fails: > > > $ CONF=linux-x86_64-server-fastdebug make test > TEST=java/io/ObjectStreamClass/ObjectStrea

Re: RFR: 8283276: java/io/ObjectStreamClass/ObjectStreamClassCaching.java fails with various GCs

2022-07-22 Thread Aleksey Shipilev
On Fri, 22 Jul 2022 10:46:57 GMT, Roman Kennke wrote: > TBH, not certain how GC policies play into that, and how well WB is supported > in each GC. Might be worth trying? > Other that that, how does removinch System.gc() help make the test more > reliable? When you call `System.gc()` on some c

Re: RFR: 8283276: java/io/ObjectStreamClass/ObjectStreamClassCaching.java fails with various GCs

2022-07-22 Thread Aleksey Shipilev
On Fri, 22 Jul 2022 10:36:32 GMT, Roman Kennke wrote: > WhiteBox has a number of methods that allow better control over GC, e.g. > fullGC(), concurrentGCRunToIdle(), etc. Would that help? I think the test relies on assumption that `System.gc()` does the weak reference clearing. Which is not gi

Re: RFR: 8290531: Loom: Parallelize a few tests more deeply

2022-07-22 Thread Aleksey Shipilev
On Tue, 19 Jul 2022 12:52:11 GMT, Aleksey Shipilev wrote: > Some of the newly added Loom tests are long-running, and thus they delay the > completion of otherwise very parallel tier1/jdk_loom. We can parallelize them > a bit better to avoid these testing stalls. > > Improv

Re: RFR: 8283276: java/io/ObjectStreamClass/ObjectStreamClassCaching.java fails with various GCs

2022-07-21 Thread Aleksey Shipilev
On Mon, 18 Jul 2022 07:40:53 GMT, Aleksey Shipilev wrote: > Test appears to pass fine with G1. But it fails with other GCs, for example > Parallel, Shenandoah, etc, it fails: > > > $ CONF=linux-x86_64-server-fastdebug make test > TEST=java/io/ObjectStreamClass/ObjectStrea

RFR: 8290531: Loom: Parallelize a few tests more deeply

2022-07-19 Thread Aleksey Shipilev
Some of the newly added Loom tests are long-running, and thus they delay the completion of otherwise very parallel tier1/jdk_loom. We can parallelize them a bit better to avoid these testing stalls. Improvements on Linux x86_64, TR 3970X, `jdk_loom hotspot_loom`: # release before real 4m41.42

Re: [jdk19] RFR: 8283276: java/io/ObjectStreamClass/ObjectStreamClassCaching.java fails with various GCs

2022-07-19 Thread Aleksey Shipilev
On Mon, 18 Jul 2022 14:48:42 GMT, Roger Riggs wrote: > Committing to the mainline and then requesting a backport of the changeset > works too. Yes, that would be my plan. - PR: https://git.openjdk.org/jdk19/pull/27

RFR: 8283276: java/io/ObjectStreamClass/ObjectStreamClassCaching.java fails with various GCs

2022-07-18 Thread Aleksey Shipilev
Test appears to pass fine with G1. But it fails with other GCs, for example Parallel, Shenandoah, etc, it fails: $ CONF=linux-x86_64-server-fastdebug make test TEST=java/io/ObjectStreamClass/ObjectStreamClassCaching.java TEST_VM_OPTS="-XX:+UseParallelGC" test ObjectStreamClassCaching.testCach

[jdk19] Withdrawn: 8283276: java/io/ObjectStreamClass/ObjectStreamClassCaching.java fails with various GCs

2022-07-18 Thread Aleksey Shipilev
On Thu, 16 Jun 2022 08:08:15 GMT, Aleksey Shipilev wrote: > Test appears to pass fine with G1. But it fails with other GCs, for example > Parallel, Shenandoah, etc, it fails: > > > $ CONF=linux-x86_64-server-fastdebug make test > TEST=java/io/ObjectStreamClass/ObjectStrea

Re: [jdk19] RFR: 8283276: java/io/ObjectStreamClass/ObjectStreamClassCaching.java fails with various GCs

2022-07-18 Thread Aleksey Shipilev
On Thu, 16 Jun 2022 08:08:15 GMT, Aleksey Shipilev wrote: > Test appears to pass fine with G1. But it fails with other GCs, for example > Parallel, Shenandoah, etc, it fails: > > > $ CONF=linux-x86_64-server-fastdebug make test > TEST=java/io/ObjectStreamClass/ObjectStrea

RFR: 8283276: java/io/ObjectStreamClass/ObjectStreamClassCaching.java fails with various GCs

2022-06-16 Thread Aleksey Shipilev
Test appears to pass fine with G1. But it fails with other GCs, for example Parallel, Shenandoah, etc, it fails: $ CONF=linux-x86_64-server-fastdebug make test TEST=java/io/ObjectStreamClass/ObjectStreamClassCaching.java TEST_VM_OPTS="-XX:+UseParallelGC" test ObjectStreamClassCaching.testCach

<    1   2   3   4   5