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

2023-10-26 Thread Xiaohong Gong
On Fri, 27 Oct 2023 05:09:23 GMT, Jatin Bhateja wrote: >> src/hotspot/share/opto/vectorIntrinsics.cpp line 1486: >> >>> 1484: // Check whether the predicated gather/scatter node is supported >>> by architecture. >>> 1485: VectorMaskUseType mask = (is_scatter || >>> !is_subword_type(ele

Re: RFR: 8314986: Module readability resolution is slow with large numbers of automatic modules

2023-10-26 Thread Alan Bateman
On Tue, 26 Sep 2023 14:57:58 GMT, Alan Bateman wrote: >> Fixes the issue (hopefully) by resolving automatic modules and automatic >> module dependencies after propagation of non-automatic transitive >> dependencies. The module tests run. >> >> I also added a few asserts to validate that the au

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

2023-10-26 Thread David Holmes
On Thu, 26 Oct 2023 22:34:24 GMT, Leonid Mesnik wrote: >> test/jtreg_test_thread_factory/src/share/classes/Virtual.java line 37: >> >>> 35: // The virtual threads don't belong to any group and need >>> global handler. >>> 36: Thread.setDefaultUncaughtExceptionHandler((t,

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

2023-10-26 Thread David Holmes
On Wed, 25 Oct 2023 21:08:01 GMT, Leonid Mesnik 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 > https://bugs.openjdk.org/browse/CODETOOL

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

2023-10-26 Thread Jatin Bhateja
> Hi All, > > This patch optimizes sub-word gather operation for x86 targets with AVX2 and > AVX512 features. > > Following is the summary of changes:- > > 1) Intrinsify sub-word gather with high performance backend implementation > based on hybrid algorithm which initially partially unrolls s

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

2023-10-26 Thread David Holmes
On Thu, 26 Oct 2023 15:02:46 GMT, Jorn Vernee wrote: >> The result of `FindClass` is a local JNI handle (in >> `find_class_from_class_loader`, called from `jni_FindClass` [1]). As such, >> we need to wrap the return value of `FindClass` in a global reference when >> storing it inside fallbackL

Re: RFR: 8318650: Optimized subword gather for x86 targets.

2023-10-26 Thread Jatin Bhateja
On Thu, 26 Oct 2023 07:21:28 GMT, Xiaohong Gong wrote: >> Hi All, >> >> This patch optimizes sub-word gather operation for x86 targets with AVX2 and >> AVX512 features. >> >> Following is the summary of changes:- >> >> 1) Intrinsify sub-word gather with high performance backend implementation

Re: RFR: 8318586: Explicitly handle upcall stub allocation failure [v3]

2023-10-26 Thread David Holmes
On Thu, 26 Oct 2023 18:07:24 GMT, Jorn Vernee wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Throw OOME for allocation failures > > src/java.base/share/classes/java/lang/foreign/Linker.java line 532: > >> 530:

Re: RFR: 8254693: Add Panama feature to pass heap segments to native code [v12]

2023-10-26 Thread Yasumasa Suenaga
On Wed, 25 Oct 2023 13:18:33 GMT, Jorn Vernee wrote: >> Jorn Vernee has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - a -> an >> - add note to downcallHandle about passing heap segments by-reference > > src/hotspot/cpu/x86/downcallLinke

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

2023-10-26 Thread Leonid Mesnik
On Thu, 26 Oct 2023 08:34:39 GMT, Alan Bateman wrote: > Having a UHE invoke System.exit is surprising. Are you saying that this is > only for cases where a test launches a child VM with the thread factory set? It is for cases when the test is started in a virtual thread. I don't see a better w

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

2023-10-26 Thread Leonid Mesnik
On Thu, 26 Oct 2023 08:34:39 GMT, Alan Bateman wrote: > Stepping back a bit. ThreadGroup is legacy and we eventually want it to go > away. We've been deprecating and degrading it very slowly over many releases. > So I think jtreg will eventually need to change. Right now, it creates > AgentVMT

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

2023-10-26 Thread Leonid Mesnik
On Wed, 25 Oct 2023 21:08:01 GMT, Leonid Mesnik 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 > https://bugs.openjdk.org/browse/CODETOOL

Re: New candidate JEP: 461: Stream Gatherers (Preview)

2023-10-26 Thread David Alayachew
Alternatively, point me in the direction of the repo, and I'll be happy to take a crack at it. On Thu, Oct 26, 2023 at 6:54 PM David Alayachew wrote: > Hello Mark, > > Thank you for posting this! > > This feature will be a blessing, and I can't wait for it to drop. > > Could we add more/better d

Re: New candidate JEP: 461: Stream Gatherers (Preview)

2023-10-26 Thread David Alayachew
Hello Mark, Thank you for posting this! This feature will be a blessing, and I can't wait for it to drop. Could we add more/better documentation for Gatherers::scan? An example would be nice, and it would also be helpful to highlight the differences between Gatherers::scan and Gatherers::fold.

Re: RFR: 8288899: java/util/concurrent/ExecutorService/CloseTest.java failed with "InterruptedException: sleep interrupted" [v55]

2023-10-26 Thread Doug Lea
> Addresses Jdk 8288899 : java/util/concurrent/ExecutorService/CloseTest.java > failed with "InterruptedException: sleep interrupted" and related issues. > > This is a major ForkJoin update (and hard to review -- sorry) that finally > addresses incompatibilities between ExecutorService and ForkJ

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

2023-10-26 Thread Leonid Mesnik
On Thu, 26 Oct 2023 06:09:34 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 >> https://bugs.openjdk.org/browse/CODET

Re: RFR: 8316969: Improve CDS module graph support for --module option [v6]

2023-10-26 Thread Calvin Cheung
> Please review this changeset for adding support for `--module` (-m) option > for CDS. > Changes in the `ModuleBootstrap.java` are needed so that the > `ArchivedModuleGraph.archive` and `ArchivedBootLayer.archive` are called if > the main module is specified. The module name will be stored in t

Re: RFR: 8316969: Improve CDS module graph support for --module option [v3]

2023-10-26 Thread Calvin Cheung
On Sat, 21 Oct 2023 07:51:42 GMT, Alan Bateman wrote: >>> > Yes, because of the following code further up in the same method: >>> >>> I think what you are actually doing here is supporting archiving of the >>> boot layer when the main module transitively depends on an incubator >>> module. We

Integrated: 8274122: java/io/File/createTempFile/SpecialTempFile.java fails in Windows 11

2023-10-26 Thread Brian Burkhalter
On Mon, 28 Aug 2023 23:55:35 GMT, Brian Burkhalter wrote: > Windows 11 does not reserve as many names as prior versions of Windows so do > not expect exceptions for COM7 and LPT1. This pull request has now been integrated. Changeset: 4a142c3b Author:Brian Burkhalter URL: https://gi

Re: RFR: 8316969: Improve CDS module graph support for --module option [v5]

2023-10-26 Thread Calvin Cheung
> Please review this changeset for adding support for `--module` (-m) option > for CDS. > Changes in the `ModuleBootstrap.java` are needed so that the > `ArchivedModuleGraph.archive` and `ArchivedBootLayer.archive` are called if > the main module is specified. The module name will be stored in t

Re: RFE: StringTemplate interpolation with custom function

2023-10-26 Thread Jim Laskey
So you are looking for a different feature - escape sequence suppression. I think that can be simply addressed independently. 📱 > On Oct 26, 2023, at 5:25 PM, Rob Spoor wrote: > > Because if you URL encode the entire interpolated string the : and / inside > the URL will also be encoded (to

Re: RFE: StringTemplate interpolation with custom function

2023-10-26 Thread Rob Spoor
Because if you URL encode the entire interpolated string the : and / inside the URL will also be encoded (to %3A and %2F respectively). Likewise, the CSV escaping will escape all of the double quotes incorrectly. On 26/10/2023 22:05, Jim Laskey wrote: I think I’m missing something. Why wouldn

Re: RFR: 8314986: Module readability resolution is slow with large numbers of automatic modules

2023-10-26 Thread Technici4n
On Tue, 26 Sep 2023 14:57:58 GMT, Alan Bateman wrote: >> Fixes the issue (hopefully) by resolving automatic modules and automatic >> module dependencies after propagation of non-automatic transitive >> dependencies. The module tests run. >> >> I also added a few asserts to validate that the au

Re: RFE: StringTemplate interpolation with custom function

2023-10-26 Thread Jim Laskey
I think I’m missing something. Why wouldn’t you just; import java.lang.StringTemplate.Processor; Processor urlEncode = template -> URLEncoder.encode(template.interpolate(), UTF_8)); Processor CSV = template -> StringEscapeUtils.escapeCsv

RFE: StringTemplate interpolation with custom function

2023-10-26 Thread Rob Spoor
I've been reading up on string templates, and I think it's a very cool feature. However, writing a custom processor can be a lot of copy-paste work if you want STR but with some extra translation applied. For instance, if I'd want to have a URL encoding processor I would have to write everythin

Re: RFR: 8288899: java/util/concurrent/ExecutorService/CloseTest.java failed with "InterruptedException: sleep interrupted" [v54]

2023-10-26 Thread Doug Lea
> Addresses Jdk 8288899 : java/util/concurrent/ExecutorService/CloseTest.java > failed with "InterruptedException: sleep interrupted" and related issues. > > This is a major ForkJoin update (and hard to review -- sorry) that finally > addresses incompatibilities between ExecutorService and ForkJ

New candidate JEP: 461: Stream Gatherers (Preview)

2023-10-26 Thread Mark Reinhold
https://openjdk.org/jeps/461 Summary: Enhance the Stream API to support custom intermediate operations. This will allow stream pipelines to transform data in ways that are not easily achievable with the existing built-in intermediate operations. This is a preview API. - Mark

Re: RFR: 8318586: Explicitly handle upcall stub allocation failure [v3]

2023-10-26 Thread Jorn Vernee
> Explicitly handle UpcallStub allocation failures by terminating. We currently > might try to use the returned `nullptr` which would fail sooner or later. > This patch just makes the termination explicit. Jorn Vernee has updated the pull request incrementally with one additional commit since t

Re: RFR: 8318586: Explicitly handle upcall stub allocation failure [v3]

2023-10-26 Thread Jorn Vernee
On Thu, 26 Oct 2023 18:07:24 GMT, Jorn Vernee wrote: >> Explicitly handle UpcallStub allocation failures by terminating. We >> currently might try to use the returned `nullptr` which would fail sooner or >> later. This patch just makes the termination explicit. > > Jorn Vernee has updated the p

Re: RFR: 8318586: Explicitly handle upcall stub allocation failure [v2]

2023-10-26 Thread Jorn Vernee
On Wed, 25 Oct 2023 10:10:57 GMT, Jorn Vernee wrote: >> Explicitly handle UpcallStub allocation failures by terminating. We >> currently might try to use the returned `nullptr` which would fail sooner or >> later. This patch just makes the termination explicit. > > Jorn Vernee has updated the p

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

2023-10-26 Thread Paul Sandoz
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 has

Re: RFR: 8315097: Rename createJavaProcessBuilder [v7]

2023-10-26 Thread Roger Riggs
On Wed, 25 Oct 2023 08:44:29 GMT, Leo Korinth wrote: >> This pull request renames `createJavaProcessBuilder` to >> `createLimitedTestJavaProcessBuilder` and renames `createTestJvm` to >> `createTestJavaProcessBuilder`. Both are implemented through a private >> `createJavaProcessBuilder`. It al

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

2023-10-26 Thread Maurizio Cimadamore
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 has

Integrated: 8318737: Fallback linker passes bad JNI handle

2023-10-26 Thread Jorn Vernee
On Tue, 24 Oct 2023 17:01:35 GMT, Jorn Vernee wrote: > The result of `FindClass` is a local JNI handle (in > `find_class_from_class_loader`, called from `jni_FindClass` [1]). As such, we > need to wrap the return value of `FindClass` in a global reference when > storing it inside fallbackLinke

Re: RFR: 8315097: Rename createJavaProcessBuilder [v7]

2023-10-26 Thread Leo Korinth
On Wed, 25 Oct 2023 08:44:29 GMT, Leo Korinth wrote: >> This pull request renames `createJavaProcessBuilder` to >> `createLimitedTestJavaProcessBuilder` and renames `createTestJvm` to >> `createTestJavaProcessBuilder`. Both are implemented through a private >> `createJavaProcessBuilder`. It al

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

2023-10-26 Thread Jorn Vernee
> The result of `FindClass` is a local JNI handle (in > `find_class_from_class_loader`, called from `jni_FindClass` [1]). As such, we > need to wrap the return value of `FindClass` in a global reference when > storing it inside fallbackLinker.c. > > While investigating this, I also noticed an e

Re: RFR: 8318586: Explicitly handle upcall stub allocation failure [v2]

2023-10-26 Thread Doug Simon
On Wed, 25 Oct 2023 10:10:57 GMT, Jorn Vernee wrote: >> Explicitly handle UpcallStub allocation failures by terminating. We >> currently might try to use the returned `nullptr` which would fail sooner or >> later. This patch just makes the termination explicit. > > Jorn Vernee has updated the p

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

2023-10-26 Thread Alan Bateman
On Wed, 25 Oct 2023 11:16:54 GMT, Jorn Vernee wrote: >> The result of `FindClass` is a local JNI handle (in >> `find_class_from_class_loader`, called from `jni_FindClass` [1]). As such, >> we need to wrap the return value of `FindClass` in a global reference when >> storing it inside fallbackL

Re: RFR: 8318586: Explicitly handle upcall stub allocation failure [v2]

2023-10-26 Thread Jorn Vernee
On Thu, 26 Oct 2023 12:17:22 GMT, David Holmes wrote: > Is stub allocation the same as other VM C heap exhaustion cases? I think it depends on the particular case. e.g. `Unsafe::allocateMemory` can also throw OOME. I think an allocation failure in the particular case of the FFM Linker allocat

Re: RFR: 8254693: Add Panama feature to pass heap segments to native code [v12]

2023-10-26 Thread Andrey Turbanov
On Tue, 24 Oct 2023 15:09:57 GMT, Jorn Vernee wrote: >> Add the ability to pass heap segments to native code. This requires using >> `Linker.Option.critical(true)` as a linker option. It has the same >> limitations as normal critical calls, namely: upcalls into Java are not >> allowed, and the

Re: RFR: 8316493: Remove the caching fields in AbstractMap [v10]

2023-10-26 Thread ExE Boss
On Thu, 19 Oct 2023 13:36:01 GMT, Per Minborg wrote: >> This PR outlines a solution for making immutable maps `@ValueBased` by >> removing cacheing of certain values in `AbstractMap`. >> >> By removing these caching fields in `AbstractMap`, we can make the immutable >> maps `@ValueBased` and a

Re: RFR: 8318586: Explicitly handle upcall stub allocation failure [v2]

2023-10-26 Thread David Holmes
On Wed, 25 Oct 2023 10:10:57 GMT, Jorn Vernee wrote: >> Explicitly handle UpcallStub allocation failures by terminating. We >> currently might try to use the returned `nullptr` which would fail sooner or >> later. This patch just makes the termination explicit. > > Jorn Vernee has updated the p

Re: RFR: 8318486: Rename JavaLangAccess.xxNoRepl to xxReportError [v2]

2023-10-26 Thread Andrey Turbanov
On Fri, 20 Oct 2023 02:29:15 GMT, Chen Liang wrote: >> Please review a patch that renames `JavaLangAccess::xxNoRepl` to >> `xxReportError` to explicitly indicate these APIs report encoding errors. >> >> The old "NoRepl" suffix presumably means "No Replacement", but it has been >> misunderstood

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

2023-10-26 Thread Chris Hegarty
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 has

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

2023-10-26 Thread Per Minborg
On Wed, 25 Oct 2023 16:35:30 GMT, Chris Hegarty wrote: >> test/jdk/jdk/incubator/vector/AbstractVectorLoadStoreTest.java line 118: >> >>> 116: private static boolean canBeConverted(IntFunction >>> function, ValueLayout elementLayout) { >>> 117: // Create a sample to analyze >>> 118:

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

2023-10-26 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: 8318839: Update test thread factory to catch all exceptions

2023-10-26 Thread Alan Bateman
On Wed, 25 Oct 2023 21:08:01 GMT, Leonid Mesnik 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 > https://bugs.openjdk.org/browse/CODETOOL

Re: RFR: 8318705: [macos] ProblemList java/rmi/registry/multipleRegistries/MultipleRegistries.java

2023-10-26 Thread Goetz Lindenmaier
On Tue, 24 Oct 2023 09:51:20 GMT, Goetz Lindenmaier wrote: > …tipleRegistries.java > > The test fails in our CI with the message listed here. We see both, aarch and > x86_64. It happens rarely, but a long time back. Thanks for the reviews! - PR Comment: https://git.openjdk.org/jd

Integrated: 8318705: [macos] ProblemList java/rmi/registry/multipleRegistries/MultipleRegistries.java

2023-10-26 Thread Goetz Lindenmaier
On Tue, 24 Oct 2023 09:51:20 GMT, Goetz Lindenmaier wrote: > …tipleRegistries.java > > The test fails in our CI with the message listed here. We see both, aarch and > x86_64. It happens rarely, but a long time back. This pull request has now been integrated. Changeset: 37c40a11 Author:Goe

Re: RFR: 8318650: Optimized subword gather for x86 targets.

2023-10-26 Thread Xiaohong Gong
On Wed, 25 Oct 2023 04:34:59 GMT, Jatin Bhateja wrote: > Hi All, > > This patch optimizes sub-word gather operation for x86 targets with AVX2 and > AVX512 features. > > Following is the summary of changes:- > > 1) Intrinsify sub-word gather with high performance backend implementation > base