Re: RFR: 8314236: Overflow in Collections.rotate [v2]

2023-08-17 Thread Aleksey Shipilev
On Wed, 16 Aug 2023 21:38:09 GMT, Stuart Marks wrote: >> test/jdk/java/util/Collections/RotateHuge.java line 27: >> >>> 25: * @test >>> 26: * @bug 8314236 >>> 27: * @summary Overflow in Collections.rotate >> >> Since this test takes >4G of heap to hold the list with compressed oops, and >>

Re: RFR: 8311939: Excessive allocation of Matcher.groups array [v2]

2023-08-15 Thread Aleksey Shipilev
On Thu, 10 Aug 2023 11:54:05 GMT, Cristian Vat wrote: >> Shouldn't the similar change be in `CIBackRef.match` too? The fact current >> tests do not catch it makes me uneasy: the test coverage seems to be rather >> low there. >> >> We need a regex expert to look at it. @rgiulietti @igraves mig

Integrated: 8314120: Add tests for FileDescriptor.sync

2023-08-15 Thread Aleksey Shipilev
On Thu, 10 Aug 2023 15:45:12 GMT, Aleksey Shipilev wrote: > When backporting [JDK-8312127](https://bugs.openjdk.org/browse/JDK-8312127), > I realized there are no targeted tests for `FileDescriptor.sync` that can be > used to qualify the changes in that area. > > Addit

Re: RFR: 8314120: Add tests for FileDescriptor.sync [v2]

2023-08-15 Thread Aleksey Shipilev
On Fri, 11 Aug 2023 15:32:58 GMT, Aleksey Shipilev wrote: >> When backporting [JDK-8312127](https://bugs.openjdk.org/browse/JDK-8312127), >> I realized there are no targeted tests for `FileDescriptor.sync` that can be >> used to qualify the changes in that area. >>

Re: RFR: 8314236: Overflow in Collections.rotate [v2]

2023-08-15 Thread Aleksey Shipilev
On Tue, 15 Aug 2023 09:45:43 GMT, Nikita Sakharin wrote: >> `Collections.rotate` method contains a bug. This method throws >> IndexOutOfBoundsException on arrays larger than $2^{30}$ elements. The way >> to reproduce: >> >> final int size = (1 << 30) + 1; >> final List list = new ArrayList<>(s

Re: RFR: 8314120: Add tests for FileDescriptor.sync [v2]

2023-08-15 Thread Aleksey Shipilev
On Fri, 11 Aug 2023 15:32:58 GMT, Aleksey Shipilev wrote: >> When backporting [JDK-8312127](https://bugs.openjdk.org/browse/JDK-8312127), >> I realized there are no targeted tests for `FileDescriptor.sync` that can be >> used to qualify the changes in that area. >>

Re: RFR: 8314236: Overflow in Collections.rotate

2023-08-14 Thread Aleksey Shipilev
On Mon, 14 Aug 2023 12:56:46 GMT, Nikita Sakharin wrote: > `Collections.rotate` method contains a bug. This method throws > IndexOutOfBoundsException on arrays larger than $2^{30}$ elements. The way to > reproduce: > > final int size = (1 << 30) + 1; > final List list = new ArrayList<>(size);

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size)

2023-08-14 Thread Aleksey Shipilev
On Mon, 14 Aug 2023 14:52:00 GMT, Lance Andersen wrote: > This PR updates the extra field validation added as part of > [JDK-8302483](https://bugs.openjdk.org/browse/JDK-8302483) to deal with > issues seen with 3rd party tools/libraries where a ZipException may be > encountered when opening

Re: RFR: 8314120: Add tests for FileDescriptor.sync [v2]

2023-08-14 Thread Aleksey Shipilev
On Sun, 13 Aug 2023 07:15:45 GMT, Alan Bateman wrote: > AutoDelete is probably a bit overkill but okay. Thanks! Any more takers? - PR Comment: https://git.openjdk.org/jdk/pull/15231#issuecomment-1677361679

Re: RFR: 8314120: Add tests for FileDescriptor.sync [v2]

2023-08-11 Thread Aleksey Shipilev
On Fri, 11 Aug 2023 14:32:29 GMT, Alan Bateman wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Review comments > > test/jdk/java/io/FileDescriptor/Sync.java line 36: > >

Re: RFR: 8314120: Add tests for FileDescriptor.sync [v2]

2023-08-11 Thread Aleksey Shipilev
> # Before JDK-8312127 > FileDescriptorSync.sync avgt 15 351,688 ? 2,477 ns/op > > # After JDK-8312127 > FileDescriptorSync.sync avgt 15 353,331 ? 2,116 ns/op > > > The new regression test completes in <0.5s on my Mac. Aleksey Shipilev has updated the pull r

RFR: 8314120: Add tests for FileDescriptor.sync

2023-08-10 Thread Aleksey Shipilev
When backporting [JDK-8312127](https://bugs.openjdk.org/browse/JDK-8312127), I realized there are no targeted tests for FileDescriptor.sync that can be used to qualify the changes in that area. Additionally, we use FD.sync for durability in Java databases, and we want to make sure at least som

Re: RFR: 8311939: Excessive allocation of Matcher.groups array [v2]

2023-08-10 Thread Aleksey Shipilev
On Fri, 28 Jul 2023 08:40:30 GMT, Aleksey Shipilev wrote: >> Cristian Vat has updated the pull request incrementally with one additional >> commit since the last revision: >> >> reduce allocations also for Matcher.usePattern > > Shouldn't the similar chan

Integrated: 8313307: java/util/Formatter/Padding.java fails on some Locales

2023-07-31 Thread Aleksey Shipilev
On Fri, 28 Jul 2023 08:49:20 GMT, Aleksey Shipilev wrote: > Fails like this: > > > $ CONF=macosx-aarch64-server-fastdebug make images test > TEST=java/util/Formatter/Padding.java > > ... > STARTED Padding::padding '[216] -001.2, % 010.1f, -1.2' >

Re: RFR: 8313307: java/util/Formatter/Padding.java fails on some Locales [v2]

2023-07-31 Thread Aleksey Shipilev
On Fri, 28 Jul 2023 17:13:54 GMT, Aleksey Shipilev wrote: >> Fails like this: >> >> >> $ CONF=macosx-aarch64-server-fastdebug make images test >> TEST=java/util/Formatter/Padding.java >> >> ... >> STARTED Pa

Re: RFR: 8313307: java/util/Formatter/Padding.java fails on some Locales [v2]

2023-07-28 Thread Aleksey Shipilev
> but was: > <-001,2> > > > Looks like a locale problem in test, so the simplest fix is to ask for a > neutral Locale there. Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision: Change to Locale.US ---

Re: RFR: 8313307: java/util/Formatter/Padding.java fails on some Locales [v2]

2023-07-28 Thread Aleksey Shipilev
On Fri, 28 Jul 2023 16:53:51 GMT, Naoto Sato wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Change to Locale.US > > test/jdk/java/util/Formatter/Padding.java line 312: >

RFR: 8313307: java/util/Formatter/Padding.java fails on some Locales

2023-07-28 Thread Aleksey Shipilev
Fails like this: $ CONF=macosx-aarch64-server-fastdebug make images test TEST=java/util/Formatter/Padding.java ... STARTED Padding::padding '[216] -001.2, % 010.1f, -1.2' org.opentest4j.AssertionFailedError: expected: <-001.2> but was: <-001,2> Looks like a locale problem in test

Re: RFR: 8311939: Excessive allocation of Matcher.groups array [v2]

2023-07-28 Thread Aleksey Shipilev
On Sat, 22 Jul 2023 12:13:10 GMT, Cristian Vat wrote: >> Reduces excessive allocation of Matcher.groups array when the original >> Pattern has no groups or less than 9 groups. >> >> Original clamping to 10 possibly due to documented behavior from javadoc: >> "In this class, \1 through \9 are a

Re: RFR: 8305947: SequenceInputStream implementation can use an Iterator rather than Enumeration

2023-07-24 Thread Aleksey Shipilev
On Mon, 19 Dec 2022 11:26:25 GMT, Romain Manni-Bucau wrote: > enumeration(list) will create an enumeration, a list and an iterator whereas > the impl only requires an iterator > this PR drops the enumeration wrapper for binary constructor and just maps > the enumeration to an iterator for the o

Re: RFR: 8305947: SequenceInputStream implementation can use an Iterator rather than Enumeration

2023-07-24 Thread Aleksey Shipilev
On Mon, 19 Dec 2022 11:26:25 GMT, Romain Manni-Bucau wrote: > enumeration(list) will create an enumeration, a list and an iterator whereas > the impl only requires an iterator > this PR drops the enumeration wrapper for binary constructor and just maps > the enumeration to an iterator for the o

Re: RFR: 8312127: FileDescriptor.sync should temporarily increase parallelism

2023-07-17 Thread Aleksey Shipilev
On Sat, 15 Jul 2023 13:54:46 GMT, Alan Bateman wrote: > If FileDescriptor::sync is invoked by a virtual thread then it doesn't > release its carrier to do other work while modifications are written to the > file system. For cases like this, parallelism should be temporarily increased > for the

Re: [jdk21] RFR: 8311645: Memory leak in jspawnhelper spawnChild after JDK-8307990

2023-07-13 Thread Aleksey Shipilev
On Thu, 13 Jul 2023 08:31:37 GMT, Aleksey Shipilev wrote: > Clean backport. Fixes the regression introduced in JDK 21. Test failures in GHA are unrelated. - PR Comment: https://git.openjdk.org/jdk21/pull/120#issuecomment-1634114884

[jdk21] Integrated: 8311645: Memory leak in jspawnhelper spawnChild after JDK-8307990

2023-07-13 Thread Aleksey Shipilev
On Thu, 13 Jul 2023 08:31:37 GMT, Aleksey Shipilev wrote: > Clean backport. Fixes the regression introduced in JDK 21. This pull request has now been integrated. Changeset: 99d87e90 Author: Aleksey Shipilev URL: https://git.openjdk.org/jdk21/com

[jdk21] RFR: 8311645: Memory leak in jspawnhelper spawnChild after JDK-8307990

2023-07-13 Thread Aleksey Shipilev
Clean backport. Fixes the regression introduced in JDK 21. - Commit messages: - Backport 401c3dea5d8823bc9c0f40506ddad46e983ebf68 Changes: https://git.openjdk.org/jdk21/pull/120/files Webrev: https://webrevs.openjdk.org/?repo=jdk21&pr=120&range=00 Issue: https://bugs.openjdk.org/

Re: RFR: 8311645: Memory leak in jspawnhelper spawnChild after JDK-8307990

2023-07-11 Thread Aleksey Shipilev
On Mon, 10 Jul 2023 18:28:08 GMT, Jenny Shivayogi wrote: >> Hi @kspeeyu , >> >> Thanks for fixing this issue. The fix looks good except the whitespace issue >> already mentioned before. >> >> Notice that we don't use TABs for code indentation in OpenJDK. For the >> native Hotspot sources (i.e

Re: RFR: 8311645: Memory leak in jspawnhelper spawnChild after JDK-8307990

2023-07-10 Thread Aleksey Shipilev
On Sat, 8 Jul 2023 02:05:27 GMT, Jenny Shivayogi wrote: > Free-ing 'buf' before two conditional return statements introduced by > JDK-8307990 Hold on a sec, let's make sure the GitHub Actions complete with all green. We can techinically wait after `/integrate` is said for sponsored changeset,

Re: RFR: 8311645: Memory leak in jspawnhelper spawnChild after JDK-8307990

2023-07-10 Thread Aleksey Shipilev
On Sat, 8 Jul 2023 02:05:27 GMT, Jenny Shivayogi wrote: > Free-ing 'buf' before two conditional return statements introduced by > JDK-8307990 Looks good! - Marked as reviewed by shade (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/14809#pullrequestreview-1522691783

Re: RFR: 8311645: Memory leak in jspawnhelper spawnChild after JDK-8307990

2023-07-10 Thread Aleksey Shipilev
On Sat, 8 Jul 2023 02:05:27 GMT, Jenny Shivayogi wrote: > Free-ing 'buf' before two conditional return statements introduced by > JDK-8307990 Looks okay, but need to fix two whitespace errors for jcheck to be happy. Also, attention @simonis, whose patch introduced this little problem, I think.

Re: RFR: 8311500: StackWalker.getCallerClass() can throw if invoked reflectively

2023-07-05 Thread Aleksey Shipilev
On Wed, 5 Jul 2023 11:45:59 GMT, Volker Simonis wrote: > As the included jtreg test demonstrates, `StackWalker.getCallerClass()` can > throw an `UnsupportedOperationException` if called reflectively. Currently > this only happens if we invoke `StackWalker.getCallerClass()` recursively > reflec

Re: RFR: 8311030: ResourceBundle.handleKeySet() is racy

2023-06-29 Thread Aleksey Shipilev
On Wed, 28 Jun 2023 11:05:11 GMT, Sergey Tsypanov wrote: > Double-checked locking should rely on local variable to avoid racy reads from > volatile field. Yeah, current code looks like a correct volatile-bearing-DCL. `keySet` is safely published already. Introducing local variable gains us not

Re: RFR: 8310232: java.time.Clock$TickClock.millis() fails in runtime when tick is 1 microsecond [v2]

2023-06-28 Thread Aleksey Shipilev
On Tue, 27 Jun 2023 16:34:40 GMT, Naoto Sato wrote: >> Fixing the `/ by zero` exception with tick durations less than a millisecond. > > Naoto Sato 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

Re: [jdk21] RFR: 8310019: MIPS builds are broken after JDK-8304913

2023-06-20 Thread Aleksey Shipilev
un 2023 > and was reviewed by Paul Hohensee, Aleksey Shipilev and Ao Qi. > > Thanks! Looks fine. - Marked as reviewed by shade (Reviewer). PR Review: https://git.openjdk.org/jdk21/pull/40#pullrequestreview-1488618518

Re: RFR: 8310019: MIPS builds are broken after JDK-8304913 [v3]

2023-06-20 Thread Aleksey Shipilev
On Thu, 15 Jun 2023 17:44:01 GMT, Roger Riggs wrote: >> Add mipsel and mips64el to the Architecture enum. >> (Later to be backported to JDK 21) > > Roger Riggs has updated the pull request incrementally with one additional > commit since the last revision: > > Correct mps64el test case Hey @

Re: [jdk21] RFR: 8310105: LoongArch64 builds are broken after JDK-8304913

2023-06-20 Thread Aleksey Shipilev
On Tue, 20 Jun 2023 15:49:42 GMT, Glavo wrote: > 8310105: LoongArch64 builds are broken after JDK-8304913 The change looks fine. This is a build breakage. I adjusted the priority to P2. - Marked as reviewed by shade (Reviewer). PR Review: https://git.openjdk.org/jdk21/pull/39#pul

Re: RFR: JDK-8310265: (process) jspawnhelper should not use argv[0] [v2]

2023-06-19 Thread Aleksey Shipilev
On Mon, 19 Jun 2023 06:07:26 GMT, Thomas Stuefe wrote: >> Reported by [jarabe...@gmail.com](mailto:jarabe...@gmail.com) [1] >> >> jspawnhelper uses argv[0] to receive the fd string from the parent. That >> breaks with conventions and trips over certain tools like binfmt_misc. >> >> For detai

Re: RFR: 8309688: Data race on java.io.ClassCache$CacheRef.strongReferent [v6]

2023-06-15 Thread Aleksey Shipilev
On Thu, 15 Jun 2023 18:17:17 GMT, Man Cao wrote: >> Hi all, >> >> Could anyone review this small fix for a data race in >> java.io.ClassCache$CacheRef? This fix makes the code safer by making the >> code data-race-free. > > Man Cao has updated the pull request incrementally with one additional

Re: RFR: 8309688: Data race on java.io.ClassCache$CacheRef.strongReferent [v5]

2023-06-15 Thread Aleksey Shipilev
On Thu, 15 Jun 2023 00:16:15 GMT, Man Cao wrote: >> Hi all, >> >> Could anyone review this small fix for a data race in >> java.io.ClassCache$CacheRef? This fix makes the code safer by making the >> code data-race-free. > > Man Cao has updated the pull request with a new target base due to a m

Re: RFR: 8310105: LoongArch64 builds are broken after JDK-8304913

2023-06-15 Thread Aleksey Shipilev
On Thu, 15 Jun 2023 04:40:59 GMT, Ao Qi wrote: > LoongArch64 Zero builds are broken after > [JDK-8304913](https://bugs.openjdk.org/browse/JDK-8304913): > > jdk.tools.jlink.plugin.PluginException: ModuleTarget is malformed: No enum > constant jdk.internal.util.Architecture.LOONGARCH64 > at > j

Re: RFR: 8310019: MIPS builds are broken after JDK-8304913 [v2]

2023-06-14 Thread Aleksey Shipilev
On Wed, 14 Jun 2023 15:50:19 GMT, Roger Riggs wrote: >> Add mipsel and mips64el to the Architecture enum. >> (Later to be backported to JDK 21) > > Roger Riggs has updated the pull request incrementally with one additional > commit since the last revision: > > Add tests for MIPSEL and MIPS64E

Re: RFR: 8310019: MIPS builds are broken after JDK-8304913

2023-06-14 Thread Aleksey Shipilev
On Wed, 14 Jun 2023 15:04:41 GMT, Roger Riggs wrote: > Add mipsel and mips64el to the Architecture enum. > (Later to be backported to JDK 21) Looking at how other platforms do it, I think this patch is incomplete. See e.g. ARM32 patch: https://github.com/openjdk/jdk/commit/83c096d6e20cd6e1164b

Re: OpenJDK fails to build on mips and mips64el after JDK-8304913

2023-06-14 Thread Aleksey Shipilev
On 14.06.23 13:17, Aleksey Shipilev wrote: On 14.06.23 11:36, Vladimir Petko wrote After JDK-8304913, OpenJDK fails to build on mips[1] and mips64el[2]. Would it be possible to consider adding those architectures to the Architecture enumeration (see attached patch)/ Submitted:   https

Re: OpenJDK fails to build on mips and mips64el after JDK-8304913

2023-06-14 Thread Aleksey Shipilev
On 14.06.23 11:36, Vladimir Petko wrote After JDK-8304913, OpenJDK fails to build on mips[1] and mips64el[2]. Would it be possible to consider adding those architectures to the Architecture enumeration (see attached patch)/ Submitted: https://bugs.openjdk.org/browse/JDK-8310019 Are you able

Re: RFR: 8309688: Data race on java.io.ClassCache$CacheRef.strongReferent [v3]

2023-06-14 Thread Aleksey Shipilev
On Tue, 13 Jun 2023 20:42:49 GMT, Man Cao wrote: >> Hi all, >> >> Could anyone review this small fix for a data race in >> java.io.ClassCache$CacheRef? This fix makes the code safer by making the >> code data-race-free. > > Man Cao has updated the pull request incrementally with one additional

Re: RFR: 8309688: Data race on java.io.ClassCache$CacheRef.strongReferent [v2]

2023-06-13 Thread Aleksey Shipilev
On Tue, 13 Jun 2023 19:24:08 GMT, Man Cao wrote: >> Hi all, >> >> Could anyone review this small fix for a data race in >> java.io.ClassCache$CacheRef? This fix makes the code safer by making the >> code data-race-free. > > Man Cao has updated the pull request with a new target base due to a m

Re: RFR: 8309408: Thread.sleep cleanup

2023-06-05 Thread Aleksey Shipilev
On Sun, 4 Jun 2023 11:28:33 GMT, Alan Bateman wrote: > Thread.sleep has had quite a bit of churn recently to support virtual > threads, add sleep(Duration), a JFR event, and the change the underlying > implementation to support sub-millis precision. I think the changes have > settled down now

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v7]

2023-06-01 Thread Aleksey Shipilev
On Thu, 1 Jun 2023 12:59:14 GMT, Brett Okken 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 13 commits: >> >> - Revert test changes >> - Merge branch 'ma

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v7]

2023-06-01 Thread Aleksey Shipilev
mentation, and there we can > clearly see the benefit with more scalable PRNG sources: > > > Benchmark Mode Cnt Score Error Units > > ### x86_64 (c6.8xlarge, Xeon, 18 cores) > > # Before, hacked `new SecureRandom()` to > `SecureRandom.getInstance(&quo

Integrated: 8308803: Improve java/util/UUID/UUIDTest.java

2023-06-01 Thread Aleksey Shipilev
On Wed, 24 May 2023 19:18:33 GMT, Aleksey Shipilev wrote: > UUID is very important class that is used to track identities of objects in > large scale systems. Yet, the coverage in JDK test is disappointing: it tests > only 100 of UUID instances per test, which is way too small

Re: RFR: 8308803: Improve java/util/UUID/UUIDTest.java [v3]

2023-06-01 Thread Aleksey Shipilev
On Wed, 31 May 2023 14:53:09 GMT, Aleksey Shipilev wrote: >> UUID is very important class that is used to track identities of objects in >> large scale systems. Yet, the coverage in JDK test is disappointing: it >> tests only 100 of UUID instances per test, which is way t

Re: RFR: 8308803: Improve java/util/UUID/UUIDTest.java [v3]

2023-05-31 Thread Aleksey Shipilev
> > I have some pending work to improve UUID performance, and tests should be > improved. > > The improved test still runs in less than 5 seconds on my laptop. Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision: Co

Re: RFR: 8308803: Improve java/util/UUID/UUIDTest.java [v2]

2023-05-31 Thread Aleksey Shipilev
On Wed, 31 May 2023 14:17:40 GMT, Roger Riggs wrote: > Two thoughts here. The random number source (SecureRandom) should have its > own tests, UUID has a simple dependency on a generator. The test for UUID is > that it composes the bits into the UUID correctly. The randomness of the > generato

Re: RFR: 8308803: Improve java/util/UUID/UUIDTest.java [v2]

2023-05-31 Thread Aleksey Shipilev
On Wed, 31 May 2023 13:11:08 GMT, Roger Riggs wrote: >> This is a non-practical concern, IMO. By spec, `UUID.randomUUID` is >> generated from the cryptographically secure random, with >120 bits of >> randomness, so the collision is extremely unlikely. Collision math involves >> birthday parado

Re: RFR: 8308803: Improve java/util/UUID/UUIDTest.java [v2]

2023-05-31 Thread Aleksey Shipilev
On Tue, 30 May 2023 20:55:39 GMT, Roger Riggs wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Review comments > > test/jdk/java/util/UUID/UUIDTest.java line 79: > >>

Re: RFR: 8308803: Improve java/util/UUID/UUIDTest.java [v2]

2023-05-30 Thread Aleksey Shipilev
On Tue, 30 May 2023 09:15:13 GMT, Aleksey Shipilev wrote: >> UUID is very important class that is used to track identities of objects in >> large scale systems. Yet, the coverage in JDK test is disappointing: it >> tests only 100 of UUID instances per test, which is way t

Re: RFR: 8308803: Improve java/util/UUID/UUIDTest.java

2023-05-30 Thread Aleksey Shipilev
On Mon, 29 May 2023 06:53:35 GMT, Jaikiran Pai wrote: > Overall, this test-only change look OK to me. Thanks for looking at it! I believe I addressed the comments in the revision. - PR Comment: https://git.openjdk.org/jdk/pull/14134#issuecomment-1568078384

Re: RFR: 8308803: Improve java/util/UUID/UUIDTest.java [v2]

2023-05-30 Thread Aleksey Shipilev
> > I have some pending work to improve UUID performance, and tests should be > improved. > > The improved test still runs in less than 5 seconds on my laptop. Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last r

Re: RFR: 8308803: Improve java/util/UUID/UUIDTest.java [v2]

2023-05-30 Thread Aleksey Shipilev
On Mon, 29 May 2023 06:48:10 GMT, Jaikiran Pai wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Review comments > > test/jdk/java/util/UUID/UUIDTest.java line 40: > >>

Re: RFR: 8289220: [Shenandoah] TestAllocObjectArrays fails intermittently

2023-05-30 Thread Aleksey Shipilev
On Tue, 30 May 2023 08:31:08 GMT, SUN Guoyun wrote: > command: make test CONF=fastdebug JTREG="VM_OPTIONS=-Xcomp" > TEST=gc/TestAllocHumongousFragment.java > error info: > > Caused by: java.lang.NullPointerException: Cannot invoke > "sun.util.locale.BaseLocale.getVariant()" because "base" is

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v6]

2023-05-26 Thread Aleksey Shipilev
mentation, and there we can > clearly see the benefit with more scalable PRNG sources: > > > Benchmark Mode Cnt Score Error Units > > ### x86_64 (c6.8xlarge, Xeon, 18 cores) > > # Before, hacked `new SecureRandom()` to > `SecureRandom.getInstance("SH

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v5]

2023-05-26 Thread Aleksey Shipilev
On Fri, 26 May 2023 15:30:29 GMT, Roger Riggs wrote: >> Yes, I used them for testing, but left them in, because it would be >> convenient to have them around for field tuning and diagnostics. This would >> require a CSR, right? > > I don't think there is a strong case for adding the system prop

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v5]

2023-05-26 Thread Aleksey Shipilev
On Fri, 26 May 2023 15:30:29 GMT, Roger Riggs wrote: >> Yes, I used them for testing, but left them in, because it would be >> convenient to have them around for field tuning and diagnostics. This would >> require a CSR, right? > > I don't think there is a strong case for adding the system prop

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v5]

2023-05-26 Thread Aleksey Shipilev
mentation, and there we can > clearly see the benefit with more scalable PRNG sources: > > > Benchmark Mode Cnt Score Error Units > > ### x86_64 (c6.8xlarge, Xeon, 18 cores) > > # Before, hacked `new SecureRandom()` to > `SecureRandom.getInstance("SH

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v3]

2023-05-26 Thread Aleksey Shipilev
On Fri, 26 May 2023 12:01:50 GMT, Andrei Pangin wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fine-tune exceptions > > src/java.base/share/classes/java/util

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v4]

2023-05-26 Thread Aleksey Shipilev
mentation, and there we can > clearly see the benefit with more scalable PRNG sources: > > > Benchmark Mode Cnt Score Error Units > > ### x86_64 (c6.8xlarge, Xeon, 18 cores) > > # Before, hacked `new SecureRandom()` to > `SecureRandom.getInstance("SH

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v2]

2023-05-26 Thread Aleksey Shipilev
On Fri, 26 May 2023 11:24:10 GMT, Daniel Fuchs wrote: >> Aleksey Shipilev has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Handle privileged properties >> - Use ByteArray to convert. Do version/va

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v3]

2023-05-26 Thread Aleksey Shipilev
mentation, and there we can > clearly see the benefit with more scalable PRNG sources: > > > Benchmark Mode Cnt Score Error Units > > ### x86_64 (c6.8xlarge, Xeon, 18 cores) > > # Before, hacked `new SecureRandom()` to > `SecureRandom.getInstance("SH

Re: RFR: 8308803: Improve java/util/UUID/UUIDTest.java

2023-05-26 Thread Aleksey Shipilev
On Wed, 24 May 2023 19:18:33 GMT, Aleksey Shipilev wrote: > UUID is very important class that is used to track identities of objects in > large scale systems. Yet, the coverage in JDK test is disappointing: it tests > only 100 of UUID instances per test, which is way too small

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v2]

2023-05-26 Thread Aleksey Shipilev
On Fri, 26 May 2023 08:37:49 GMT, Aleksey Shipilev wrote: >> `jdk.internal.util.ByteArray` has VarHandle-based methods ready for that > > Yes, I have that optimization in the pipeline, and wanted to do so > separately. I can still fold it here, let me see. Did s

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v2]

2023-05-26 Thread Aleksey Shipilev
On Thu, 25 May 2023 12:17:27 GMT, Alan Bateman wrote: >> Aleksey Shipilev has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Handle privileged properties >> - Use ByteArray to convert. Do version/va

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v2]

2023-05-26 Thread Aleksey Shipilev
mentation, and there we can > clearly see the benefit with more scalable PRNG sources: > > > Benchmark Mode Cnt Score Error Units > > ### x86_64 (c6.8xlarge, Xeon, 18 cores) > > # Before, hacked `new SecureRandom()` to > `SecureRandom.getInstance("SHA

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access

2023-05-26 Thread Aleksey Shipilev
On Fri, 26 May 2023 08:39:10 GMT, Aleksey Shipilev wrote: >> src/java.base/share/classes/java/util/UUID.java line 260: >> >>> 258: buf[c + 8] &= 0x3f; /* clear variant*/ >>> 259: buf[c + 8] |= (byte)

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access

2023-05-26 Thread Aleksey Shipilev
On Fri, 26 May 2023 00:16:19 GMT, Andrei Pangin wrote: >> UUID is the very important class that is used to track identities of objects >> in large scale systems. On some of our systems, `UUID.randomUUID` takes >1% >> of total CPU time, and is frequently a scalability bottleneck due to >> `Secu

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access

2023-05-26 Thread Aleksey Shipilev
On Fri, 26 May 2023 06:47:29 GMT, Hannes Greule wrote: >> src/java.base/share/classes/java/util/UUID.java line 286: >> >>> 284: long lsb = 0; >>> 285: for (int i = start; i < start + 8; i++) { >>> 286: msb = (msb << 8) | (data[i] & 0xff); >> >> Can we use VarHandle/B

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access

2023-05-26 Thread Aleksey Shipilev
On Fri, 26 May 2023 00:50:04 GMT, Brett Okken wrote: >> UUID is the very important class that is used to track identities of objects >> in large scale systems. On some of our systems, `UUID.randomUUID` takes >1% >> of total CPU time, and is frequently a scalability bottleneck due to >> `Secure

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access

2023-05-26 Thread Aleksey Shipilev
On Fri, 26 May 2023 00:13:57 GMT, Andrei Pangin wrote: >> UUID is the very important class that is used to track identities of objects >> in large scale systems. On some of our systems, `UUID.randomUUID` takes >1% >> of total CPU time, and is frequently a scalability bottleneck due to >> `Secu

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access

2023-05-25 Thread Aleksey Shipilev
On Thu, 25 May 2023 14:01:43 GMT, Alan Bateman wrote: >> UUID is the very important class that is used to track identities of objects >> in large scale systems. On some of our systems, `UUID.randomUUID` takes >1% >> of total CPU time, and is frequently a scalability bottleneck due to >> `Secur

RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access

2023-05-25 Thread Aleksey Shipilev
UUID is the very important class that is used to track identities of objects in large scale systems. On some of our systems, `UUID.randomUUID` takes >1% of total CPU time, and is frequently a scalability bottleneck due to `SecureRandom` synchronization. The major issue with UUID code itself is

RFR: 8308803: Improve java/util/UUID/UUIDTest.java

2023-05-24 Thread Aleksey Shipilev
UUID is very important class that is used to track identities of objects in large scale systems. Yet, the coverage in JDK test is disappointing: it tests only 100 of UUID instances per test, which is way too small to detect collisions due to the bad randomness for example. I have some pending w

Re: RFR: 8307483: New micros for j.u.c.LockSupport [v3]

2023-05-17 Thread Aleksey Shipilev
On Tue, 9 May 2023 19:13:42 GMT, Eric Caspole wrote: >> These micros were developed while investigating JDK-8305670 by myself and >> Sergey Kuksenko. The order of thread creation was important in that bug, so >> there are 2 JMH for creating sleepers before and after the worker threads. > > Eric

Re: RFR: 8308246: PPC64le build broken after JDK-8304913

2023-05-17 Thread Aleksey Shipilev
On Wed, 17 May 2023 07:16:17 GMT, Martin Doerr wrote: > PPC64le needs to get recognized as PPC64. Otherwise, jlink doesn't recognize > the platform and throws a PluginException: ModuleTarget is malformed: No enum > constant jdk.internal.util.Architecture.PPC64LE. Looks fine, but I have a sugge

Re: RFR: 8307483: New micros for j.u.c.LockSupport

2023-05-08 Thread Aleksey Shipilev
On Mon, 8 May 2023 05:58:26 GMT, David Holmes wrote: >> test/micro/org/openjdk/bench/java/util/concurrent/UnparkBenchSleepersAfter.java >> line 131: >> >>> 129: public void run() { >>> 130: my_thread = Thread.currentThread(); >>> 131: while (!done) { >> >> You m

Re: RFR: 8307483: New micros for j.u.c.LockSupport

2023-05-08 Thread Aleksey Shipilev
On Thu, 4 May 2023 20:17:11 GMT, Eric Caspole wrote: > These micros were developed while investigating JDK-8305670 by myself and > Sergey Kuksenko. The order of thread creation was important in that bug, so > there are 2 JMH for creating sleepers before and after the worker threads. Cursory st

Integrated: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity

2023-05-03 Thread Aleksey Shipilev
On Wed, 29 Mar 2023 11:28:53 GMT, Aleksey Shipilev wrote: > Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The > documentation for that method clearly says the precision and accuracy are > dependent on the underlying system behavior. However, it always

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v12]

2023-05-03 Thread Aleksey Shipilev
On Thu, 27 Apr 2023 09:40:46 GMT, Aleksey Shipilev 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 26 commits: >> >> - Merge branch 'master' into JDK-83050920-thr

Re: RFR: 8306461: ObjectInputStream::readObject() should handle negative array sizes without throwing NegativeArraySizeExceptions [v4]

2023-05-02 Thread Aleksey Shipilev
On Tue, 2 May 2023 13:26:31 GMT, Volker Simonis wrote: >> This issue was reported by: Yakov Shafranovich >> ([yako...@amazon.com](mailto:yako...@amazon.com)) >> >> Currently, `ObjectInputStream::readObject()` doesn't explicitly checks for a >> negative array length in the deserialization strea

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v12]

2023-04-27 Thread Aleksey Shipilev
On Wed, 26 Apr 2023 20:22:54 GMT, Aleksey Shipilev wrote: >> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The >> documentation for that method clearly says the precision and accuracy are >> dependent on the underlying system behavior. However, i

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v12]

2023-04-26 Thread Aleksey Shipilev
dditional testing: > - [x] New regression test > - [x] New benchmark > - [x] Linux x86_64 `tier1` > - [x] Linux AArch64 `tier1` Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 26 commits: - Merge branch

Re: RFR: 8306461: ObjectInputStream::readObject() should handle negative array sizes without throwing NegativeArraySizeExceptions [v3]

2023-04-26 Thread Aleksey Shipilev
On Wed, 26 Apr 2023 11:37:23 GMT, Volker Simonis wrote: >> This issue was reported by: Yakov Shafranovich >> ([yako...@amazon.com](mailto:yako...@amazon.com)) >> >> Currently, `ObjectInputStream::readObject()` doesn't explicitly checks for a >> negative array length in the deserialization stre

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v11]

2023-04-25 Thread Aleksey Shipilev
dditional testing: > - [x] New regression test > - [x] New benchmark > - [x] Linux x86_64 `tier1` > - [x] Linux AArch64 `tier1` Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 25 commits: - Merge branc

Integrated: 8306773: Problemlist jdk/incubator/vector/ShortMaxVectorTests.java on x86_32

2023-04-24 Thread Aleksey Shipilev
On Mon, 24 Apr 2023 18:26:24 GMT, Aleksey Shipilev wrote: > There is a product bug, see the parent bug. Problemlisting to get cleaner GHA > runs. > > Additional testing: > - [x] GHA This pull request has now been integrated. Changeset: 2985738f Author:Alekse

Re: RFR: 8306773: Problemlist jdk/incubator/vector/ShortMaxVectorTests.java on x86_32

2023-04-24 Thread Aleksey Shipilev
On Mon, 24 Apr 2023 18:26:24 GMT, Aleksey Shipilev wrote: > There is a product bug, see the parent bug. Problemlisting to get cleaner GHA > runs. > > Additional testing: > - [x] GHA Thanks! I am integrating to get cleaner GHA runs. - PR Comment: https://git.

RFR: 8306773: Problemlist jdk/incubator/vector/ShortMaxVectorTests.java on x86_32

2023-04-24 Thread Aleksey Shipilev
There is a product bug, see the parent bug. Problemlisting to get cleaner GHA runs. Additional testing: - [ ] GHA - Commit messages: - Fix Changes: https://git.openjdk.org/jdk/pull/13623/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13623&range=00 Issue: https://bug

Re: RFR: 8306461: ObjectInputStream::readObject() should handle negative array sizes without throwing NegativeArraySizeExceptions [v2]

2023-04-24 Thread Aleksey Shipilev
On Mon, 24 Apr 2023 14:41:58 GMT, Volker Simonis wrote: >> This issue was reported by: Yakov Shafranovich >> ([yako...@amazon.com](mailto:yako...@amazon.com)) >> >> Currently, `ObjectInputStream::readObject()` doesn't explicitly checks for a >> negative array length in the deserialization stre

Re: RFR: 8306461: ObjectInputStream::readObject() should handle negative array sizes without throwing NegativeArraySizeExceptions [v2]

2023-04-24 Thread Aleksey Shipilev
On Mon, 24 Apr 2023 14:41:58 GMT, Volker Simonis wrote: >> This issue was reported by: Yakov Shafranovich >> ([yako...@amazon.com](mailto:yako...@amazon.com)) >> >> Currently, `ObjectInputStream::readObject()` doesn't explicitly checks for a >> negative array length in the deserialization stre

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v10]

2023-04-21 Thread Aleksey Shipilev
dditional testing: > - [x] New regression test > - [x] New benchmark > - [x] Linux x86_64 `tier1` > - [x] Linux AArch64 `tier1` Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 23 commits: - Merge bran

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v9]

2023-04-20 Thread Aleksey Shipilev
On Thu, 20 Apr 2023 12:28:56 GMT, David Holmes wrote: >> Hm, "later" where? Because I see the call to `pthread_condwait_timed` right >> after we produced abstime using `nanos_to_nanos_bounded`, and this looks >> like the last opportunity to handle the `MAX_SECS` limit: >> https://github.com/ope

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v9]

2023-04-20 Thread Aleksey Shipilev
On Thu, 20 Apr 2023 12:04:38 GMT, David Holmes wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Handle overflows > > src/hotspot/os/posix/os_posix.cpp line 1342: > >>

Re: RFR: 8306461: ObjectInputStream::readObject() should handle negative array sizes without throwing NegativeArraySizeExceptions

2023-04-20 Thread Aleksey Shipilev
On Wed, 19 Apr 2023 16:47:33 GMT, Volker Simonis wrote: > This issue was reported by: Yakov Shafranovich > ([yako...@amazon.com](mailto:yako...@amazon.com)) > > Currently, `ObjectInputStream::readObject()` doesn't explicitly checks for a > negative array length in the deserialization stream. I

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity [v9]

2023-04-20 Thread Aleksey Shipilev
On Thu, 20 Apr 2023 09:29:43 GMT, Aleksey Shipilev wrote: >> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The >> documentation for that method clearly says the precision and accuracy are >> dependent on the underlying system behavior. However, i

<    1   2   3   4   5   6   >