Re: RFR: 8315004: Runtime.halt() debug logging

2023-10-30 Thread Quan Anh Mai
On Tue, 31 Oct 2023 00:14:39 GMT, Masanori Yano wrote: >>> @AlanBateman Sorry for missing your comment on JBS. I can't find any >>> discussion of the need for logs in Runtime.halt in JDK-8301627, so I'm not >>> sure if it was intentional that no logging output was added to Runtime.halt. >>>

Re: RFR: 8318650: Optimized subword gather for x86 targets. [v2]

2023-10-30 Thread Xiaohong Gong
On Sun, 29 Oct 2023 22:23:09 GMT, Jatin Bhateja wrote: > Due to lane size differences b/w sub-word and integer it may never be > possible to have compatible species. That's true. So maybe we could just 1) make sure the index array is inside of the boundary (i.e. the length is at least the

Re: RFR: 8318650: Optimized subword gather for x86 targets. [v2]

2023-10-30 Thread Xiaohong Gong
On Sun, 29 Oct 2023 22:11:31 GMT, Jatin Bhateja wrote: > I think for the time being its better to align masked sub-word gather > implementation with non-sub-word ones i.e. support intrinsfication only for > predicated targets. Respective backends may then choose to either emit a > predicated

Re: RFR: 8315004: Runtime.halt() debug logging

2023-10-30 Thread Masanori Yano
On Fri, 1 Sep 2023 08:29:41 GMT, Alan Bateman wrote: >> I think you may have missed the comment in the JBS issue. Logging means >> running potentially arbitrary code, doing this at Runtime.halt time is >> problematic. I thought the conclusion from the work on Runtime.exit was not >> to log in

Re: RFR: 8318839: Update test thread factory to catch all exceptions

2023-10-30 Thread David Holmes
On Mon, 30 Oct 2023 18:29:30 GMT, Leonid Mesnik wrote: >> Hello Leonid, in order to understand what exactly we are trying to solve >> here, I ran a few tests to see how things work without the changes being >> proposed in this PR. Here's my findings. >> >> A bit of background first. When

Re: [External] : Re: Update on JEP-461: Stream Gatherers (Preview)

2023-10-30 Thread Remi Forax
> From: "Viktor Klang" > To: "Tyler Kindy" > Cc: "core-libs-dev" > Sent: Monday, October 30, 2023 10:59:48 PM > Subject: Re: [External] : Re: Update on JEP-461: Stream Gatherers (Preview) > That's also a good point, and I've heard from multiple sources that sometimes > you want to make sure

Re: RFR: 8303374: Compiler Implementation for Primitive types in patterns, instanceof, and switch (Preview) [v27]

2023-10-30 Thread Aggelos Biboudis
> This is the proposed patch for Primitive types in patterns, instanceof, and > switch (Preview). > > Draft spec here: > https://cr.openjdk.org/~abimpoudis/instanceof/jep443-20231010/specs/instanceof-jls.html Aggelos Biboudis has updated the pull request with a new target base due to a merge

Re: [External] : Re: Update on JEP-461: Stream Gatherers (Preview)

2023-10-30 Thread Viktor Klang
That's also a good point, and I've heard from multiple sources that sometimes you want to make sure that you only have a single element left at the end, and otherwise throw an exception. Fortunately it is possible to do something to the effect of: // Proof of concept only public static

Integrated: 8310933: Copying from runtime image to application image should not follow symlinks

2023-10-30 Thread Alexander Matveev
On Mon, 30 Oct 2023 19:43:32 GMT, Alexander Matveev wrote: > - Added LinkOption.NOFOLLOW_LINKS when copying pre-define runtime image. > - Added test to cover this change. > - Cleanup RuntimeImageTest.java by removing unused imports and removed > incubator from jpackage module name. This pull

Re: RFR: 8310933: Copying from runtime image to application image should not follow symlinks

2023-10-30 Thread Alexey Semenyuk
On Mon, 30 Oct 2023 19:43:32 GMT, Alexander Matveev wrote: > - Added LinkOption.NOFOLLOW_LINKS when copying pre-define runtime image. > - Added test to cover this change. > - Cleanup RuntimeImageTest.java by removing unused imports and removed > incubator from jpackage module name. Marked as

Re: RFR: 8303920: Avoid calling out to python in DataDescriptorSignatureMissing test [v9]

2023-10-30 Thread Lance Andersen
On Mon, 30 Oct 2023 17:48:48 GMT, Eirik Bjorsnos wrote: >> Please review this PR which brings the DataDescriptorSignatureMissing test >> back to life. >> >> This test currently calls out to Python to create a test vector ZIP with a >> Data Descriptor without the recommended but optional

Re: RFR: 8303920: Avoid calling out to python in DataDescriptorSignatureMissing test [v8]

2023-10-30 Thread Eirik Bjorsnos
On Mon, 30 Oct 2023 17:45:28 GMT, Eirik Bjorsnos wrote: >> test/jdk/java/util/zip/DataDescriptorSignatureMissing.java line 3: >> >>> 1: /* >>> 2: * Copyright 2012 Google, Inc. All Rights Reserved. >>> 3: * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. >> >> I am not

RFR: 8310933: Copying from runtime image to application image should not follow symlinks

2023-10-30 Thread Alexander Matveev
- Added LinkOption.NOFOLLOW_LINKS when copying pre-define runtime image. - Added test to cover this change. - Cleanup RuntimeImageTest.java by removing unused imports and removed incubator from jpackage module name. - Commit messages: - 8310933: Copying from runtime image to

Re: RFR: 8318839: Update test thread factory to catch all exceptions

2023-10-30 Thread Leonid Mesnik
On Sun, 29 Oct 2023 14:10:32 GMT, Jaikiran Pai wrote: >> The jtreg starts the main thread in a separate ThreadGroup and checks >> unhandled exceptions for this group. However, it doesn't catch all unhandled >> exceptions. There is a jtreg issue for this >>

Integrated: 8313621: test/jdk/jdk/internal/math/FloatingDecimal/TestFloatingDecimal should use RandomFactory

2023-10-30 Thread Brian Burkhalter
On Tue, 10 Oct 2023 23:21:42 GMT, Brian Burkhalter wrote: > Change test to use `RandomFactory` instead of `new Random()` and convert it > to JUnit 5. This pull request has now been integrated. Changeset: 864a876e Author:Brian Burkhalter URL:

Re: RFR: 8313621: test/jdk/jdk/internal/math/FloatingDecimal/TestFloatingDecimal should use RandomFactory [v3]

2023-10-30 Thread Raffaello Giulietti
On Mon, 30 Oct 2023 17:55:47 GMT, Brian Burkhalter wrote: >> Change test to use `RandomFactory` instead of `new Random()` and convert it >> to JUnit 5. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8313621:

Re: RFR: 8313621: test/jdk/jdk/internal/math/FloatingDecimal/TestFloatingDecimal should use RandomFactory [v3]

2023-10-30 Thread Brian Burkhalter
> Change test to use `RandomFactory` instead of `new Random()` and convert it > to JUnit 5. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8313621: Initialize NUM_RANDOM_TESTS more clearly - Changes: - all:

Re: RFR: 8313621: test/jdk/jdk/internal/math/FloatingDecimal/TestFloatingDecimal should use RandomFactory [v2]

2023-10-30 Thread Brian Burkhalter
On Mon, 30 Oct 2023 13:57:05 GMT, Raffaello Giulietti wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8313621: assertTrue -> assertEquals > >

Re: RFR: 8303920: Avoid calling out to python in DataDescriptorSignatureMissing test [v8]

2023-10-30 Thread Eirik Bjorsnos
On Mon, 30 Oct 2023 15:02:57 GMT, Lance Andersen wrote: > Another question, is the zip that is generated by this test readable by other > zip tools such as info-zip, Apache Common-compress, winzip? - info-zip: Does not support unzipping from a zip, so uses the CEN instead of the data

Re: RFR: 8303920: Avoid calling out to python in DataDescriptorSignatureMissing test [v9]

2023-10-30 Thread Eirik Bjorsnos
> Please review this PR which brings the DataDescriptorSignatureMissing test > back to life. > > This test currently calls out to Python to create a test vector ZIP with a > Data Descriptor without the recommended but optional signature. The Python > dependency has turned out to be very

Re: [External] : Re: Update on JEP-461: Stream Gatherers (Preview)

2023-10-30 Thread Tyler Kindy
Hi Viktor,Thanks for the response! I see what you mean, it’s a good point that single-element streams are just as valid as streams with other numbers of elements.The weird part for me, though, is getting the folded result out of the stream at the end (which, while not always, I believe will be the

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

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: 8318678: Vector access on heap MemorySegments only works for byte[] [v3]

2023-10-30 Thread Paul Sandoz
On Mon, 30 Oct 2023 13:43:13 GMT, Per Minborg wrote: >> This PR proposes removing the restriction that only heap `MemorySegment` >> wrapping a `byte` array can be accessed by Vectors. Now any array type can >> be used provided the element alignment constraints are respected. > > Per Minborg

Re: RFR: 8318678: Vector access on heap MemorySegments only works for byte[] [v3]

2023-10-30 Thread Paul Sandoz
On Mon, 30 Oct 2023 13:43:13 GMT, Per Minborg wrote: >> This PR proposes removing the restriction that only heap `MemorySegment` >> wrapping a `byte` array can be accessed by Vectors. Now any array type can >> be used provided the element alignment constraints are respected. > > Per Minborg

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

2023-10-30 Thread Alan Bateman
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 > `ScopedValue`'s

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: 8304020: Speed up test/jdk/java/util/zip/ZipFile/TestTooManyEntries.java and clarify its purpose [v7]

2023-10-30 Thread Eirik Bjorsnos
On Mon, 30 Oct 2023 14:28:28 GMT, Lance Andersen wrote: > Please see comments below Big thanks for your review Lance! I think I have addressed your concerns now. > I would suggest a comment to help future developers. I realize there are some > earlier bread crumbs but I think this would be

Re: RFR: 8304020: Speed up test/jdk/java/util/zip/ZipFile/TestTooManyEntries.java and clarify its purpose [v10]

2023-10-30 Thread Eirik Bjorsnos
> Please review this PR which speeds up TestTooManyEntries and clarifies its > purpose: > > - The name 'TestTooManyEntries' does not clearly convey the purpose of the > test. What is tested is the validation that the total CEN size fits in a Java > byte array. Suggested rename: CenSizeTooLarge

Re: RFR: 8304020: Speed up test/jdk/java/util/zip/ZipFile/TestTooManyEntries.java and clarify its purpose [v9]

2023-10-30 Thread Eirik Bjorsnos
> Please review this PR which speeds up TestTooManyEntries and clarifies its > purpose: > > - The name 'TestTooManyEntries' does not clearly convey the purpose of the > test. What is tested is the validation that the total CEN size fits in a Java > byte array. Suggested rename: CenSizeTooLarge

Re: RFR: 8304020: Speed up test/jdk/java/util/zip/ZipFile/TestTooManyEntries.java and clarify its purpose [v7]

2023-10-30 Thread Eirik Bjorsnos
On Mon, 30 Oct 2023 14:10:25 GMT, Lance Andersen wrote: >> Eirik Bjorsnos 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 14 additional >>

Re: RFR: 8304020: Speed up test/jdk/java/util/zip/ZipFile/TestTooManyEntries.java and clarify its purpose [v3]

2023-10-30 Thread Eirik Bjorsnos
On Mon, 30 Oct 2023 14:29:41 GMT, Lance Andersen wrote: > > Was the `@requires (sun.arch.data.model == "64")` added to satisfy the 8GB > > memory requirement? If so, I guess we can safely remove the requires tag, > > even though the test still creates a ~2GB sparse file? > > We would have to

Re: RFR: 8304020: Speed up test/jdk/java/util/zip/ZipFile/TestTooManyEntries.java and clarify its purpose [v8]

2023-10-30 Thread Eirik Bjorsnos
> Please review this PR which speeds up TestTooManyEntries and clarifies its > purpose: > > - The name 'TestTooManyEntries' does not clearly convey the purpose of the > test. What is tested is the validation that the total CEN size fits in a Java > byte array. Suggested rename: CenSizeTooLarge

Re: RFR: 8303920: Avoid calling out to python in DataDescriptorSignatureMissing test [v8]

2023-10-30 Thread Lance Andersen
On Sat, 28 Oct 2023 20:01:56 GMT, Eirik Bjorsnos wrote: >> Please review this PR which brings the DataDescriptorSignatureMissing test >> back to life. >> >> This test currently calls out to Python to create a test vector ZIP with a >> Data Descriptor without the recommended but optional

Re: RFR: JDK-8318467 : [jmh] tests concurrent.Queues and concurrent.ProducerConsumer hang with 101+ threads

2023-10-30 Thread Viktor Klang
On Mon, 30 Oct 2023 15:01:02 GMT, Doug Lea wrote: >> Discussed with @DougLea and adjusting the queue capacity to at least the >> number of participating threads seems like the most sensible fix. > > Thanks for figuring out where to make the adjustment! Looks good. @DougLea Yeah it took some

Re: RFR: JDK-8318467 : [jmh] tests concurrent.Queues and concurrent.ProducerConsumer hang with 101+ threads [v2]

2023-10-30 Thread Viktor Klang
> Discussed with @DougLea and adjusting the queue capacity to at least the > number of participating threads seems like the most sensible fix. Viktor Klang has updated the pull request incrementally with one additional commit since the last revision: Updating copyright year and adjusting

Re: RFR: JDK-8318467 : [jmh] tests concurrent.Queues and concurrent.ProducerConsumer hang with 101+ threads

2023-10-30 Thread Doug Lea
On Mon, 30 Oct 2023 14:54:08 GMT, Viktor Klang wrote: > Discussed with @DougLea and adjusting the queue capacity to at least the > number of participating threads seems like the most sensible fix. Thanks for figuring out where to make the adjustment! Looks good. - PR Comment:

RFR: JDK-8318467 : [jmh] tests concurrent.Queues and concurrent.ProducerConsumer hang with 101+ threads

2023-10-30 Thread Viktor Klang
Discussed with @DougLea and adjusting the queue capacity to at least the number of participating threads seems like the most sensible fix. - Commit messages: - Addressing 8318467 by adjusting queue capacity to at least the number of threads Changes:

Re: [External] : Re: Update on JEP-461: Stream Gatherers (Preview)

2023-10-30 Thread Viktor Klang
Hi Tyler, Thank you for the kind words -- they are much appreciated. And you have a very good question indeed! My thinking behind making fold a Gatherer is that I think that it is strictly more powerful than "only" having it as a collector (It wouldn't be able to be a Collector since you'd

Re: RFR: 8304020: Speed up test/jdk/java/util/zip/ZipFile/TestTooManyEntries.java and clarify its purpose [v6]

2023-10-30 Thread Lance Andersen
On Mon, 13 Mar 2023 03:18:26 GMT, Eirik Bjorsnos wrote: >> test/jdk/java/util/zip/ZipFile/CenSizeTooLarge.java line 53: >> >>> 51: >>> 52: // Maximum size (unsigned short) of an extra field allowed by the >>> standard >>> 53: static final int MAX_EXTRA_FIELD_SIZE = 0X; >> >>

Re: RFR: 8304020: Speed up test/jdk/java/util/zip/ZipFile/TestTooManyEntries.java and clarify its purpose [v3]

2023-10-30 Thread Lance Andersen
On Mon, 30 Oct 2023 12:13:59 GMT, Eirik Bjorsnos wrote: > > I think the changes look good overall. Thank you for this. I am not sure > > that the `@requires` is needed at this point. > > Was the `@requires (sun.arch.data.model == "64")` added to satisfy the 8GB > memory requirement? If so, I

Re: RFR: 8304020: Speed up test/jdk/java/util/zip/ZipFile/TestTooManyEntries.java and clarify its purpose [v7]

2023-10-30 Thread Lance Andersen
On Mon, 30 Oct 2023 11:57:09 GMT, Eirik Bjorsnos wrote: >> Please review this PR which speeds up TestTooManyEntries and clarifies its >> purpose: >> >> - The name 'TestTooManyEntries' does not clearly convey the purpose of the >> test. What is tested is the validation that the total CEN size

Re: RFR: 8313621: test/jdk/jdk/internal/math/FloatingDecimal/TestFloatingDecimal should use RandomFactory [v2]

2023-10-30 Thread Raffaello Giulietti
On Wed, 11 Oct 2023 15:45:29 GMT, Brian Burkhalter wrote: >> Change test to use `RandomFactory` instead of `new Random()` and convert it >> to JUnit 5. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8313621:

Re: RFR: 8318678: Vector access on heap MemorySegments only works for byte[] [v3]

2023-10-30 Thread Per Minborg
> This PR proposes removing the restriction that only heap `MemorySegment` > wrapping a `byte` array can be accessed by Vectors. Now any array type can be > used provided the element alignment constraints are respected. Per Minborg has updated the pull request incrementally with one additional

Re: RFR: 8318678: Vector access on heap MemorySegments only works for byte[] [v2]

2023-10-30 Thread Per Minborg
On Thu, 26 Oct 2023 09:17:25 GMT, Per Minborg wrote: >> This PR proposes removing the restriction that only heap `MemorySegment` >> wrapping a `byte` array can be accessed by Vectors. Now any array type can >> be used provided the element alignment constraints are respected. > > Per Minborg

Re: RFR: 8304020: Speed up test/jdk/java/util/zip/ZipFile/TestTooManyEntries.java and clarify its purpose [v3]

2023-10-30 Thread Eirik Bjorsnos
On Sun, 12 Mar 2023 11:21:18 GMT, Eirik Bjorsnos wrote: > I think the changes look good overall. Thank you for this. I am not sure that > the `@requires` is needed at this point. Was the `@requires (sun.arch.data.model == "64")` added to satisfy the 8GB memory requirement? If so, I guess we

Re: RFR: 8304020: Speed up test/jdk/java/util/zip/ZipFile/TestTooManyEntries.java and clarify its purpose [v3]

2023-10-30 Thread Eirik Bjorsnos
On Sun, 12 Mar 2023 14:12:08 GMT, Lance Andersen wrote: >> Eirik Bjorsnos has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Use Integer.toString instead of Long.toString > >> Here's a wild idea: >> >> We could inject large extra fields

Re: RFR: 8304020: Speed up test/jdk/java/util/zip/ZipFile/TestTooManyEntries.java and clarify its purpose [v7]

2023-10-30 Thread Eirik Bjorsnos
> Please review this PR which speeds up TestTooManyEntries and clarifies its > purpose: > > - The name 'TestTooManyEntries' does not clearly convey the purpose of the > test. What is tested is the validation that the total CEN size fits in a Java > byte array. Suggested rename: CenSizeTooLarge

Re: Update on JEP-461: Stream Gatherers (Preview)

2023-10-30 Thread Tyler Kindy
Thanks for the JEP and your talk, Viktor! I think `Stream::gather` will be super useful in my day-to-day as a Java developer.I’m curious why `fold` is being implemented with gatherers. I recognize `Gatherer` is designed to support intermediate operations, but `fold` feels inherently like a

Re: RFR: 8316704: Regex-free parsing of Formatter and FormatProcessor specifiers

2023-10-30 Thread Shaojin Wen
On Thu, 28 Sep 2023 15:01:25 GMT, Raffaello Giulietti wrote: >> @cl4es made performance optimizations for the simple specifiers of >> String.format in PR https://github.com/openjdk/jdk/pull/2830. Based on the >> same idea, I continued to make improvements. I made patterns like %2d %02d >>

Integrated: 8315532: Compiler Implementation for Unnamed Variables & Patterns

2023-10-30 Thread Aggelos Biboudis
On Sat, 9 Sep 2023 00:02:20 GMT, Aggelos Biboudis wrote: > This PR finalizes the feature of unnamed variables and patterns. This pull request has now been integrated. Changeset: c9d23c39 Author:Aggelos Biboudis Committer: Jan Lahoda URL:

Re: RFR: 8315532: Compiler Implementation for Unnamed Variables & Patterns [v7]

2023-10-30 Thread Jan Lahoda
On Wed, 18 Oct 2023 10:29:32 GMT, Aggelos Biboudis wrote: >> This PR finalizes the feature of unnamed variables and patterns. > > Aggelos Biboudis has updated the pull request incrementally with one > additional commit since the last revision: > > Remove preview lines from a new .out file

Re: RFR: 8318839: Update test thread factory to catch all exceptions

2023-10-30 Thread David Holmes
On Sun, 29 Oct 2023 14:10:32 GMT, Jaikiran Pai wrote: >> The jtreg starts the main thread in a separate ThreadGroup and checks >> unhandled exceptions for this group. However, it doesn't catch all unhandled >> exceptions. There is a jtreg issue for this >>

Re: RFR: 8318737: Fallback linker passes bad JNI handle [v3]

2023-10-30 Thread David Holmes
On Fri, 27 Oct 2023 09:09:05 GMT, Jorn Vernee wrote: > Do you want me to create a separate PR to remove the comment? No not necessary. Thanks - PR Comment: https://git.openjdk.org/jdk/pull/16349#issuecomment-1784664238