Re: RFR: 8338023: Support two vector selectFrom API [v5]

2024-08-22 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using index values stored in the lanes of "this" vector, assembl

Re: RFR: 8338023: Support two vector selectFrom API [v4]

2024-08-22 Thread Jatin Bhateja
On Fri, 23 Aug 2024 05:46:29 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v4]

2024-08-22 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using index values stored in the lanes of "this" vector, assembl

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-22 Thread David Holmes
On Thu, 22 Aug 2024 08:54:56 GMT, Magnus Ihse Bursie wrote: >> Sorry but I don't understand the point of changing build-time constructs >> using `ifdef STATIC_BUILD` into what appear to be runtime checks, but the >> result of which is already determined at build time. These are not really >> r

Re: RFR: 8338745: Intrinsify Continuation.pin() and Continuation.unpin() [v3]

2024-08-22 Thread Dean Long
On Thu, 22 Aug 2024 15:50:32 GMT, Vladimir Kozlov wrote: >> It is updated to use Action::none to keep the nmethod. The trap code picks >> up the correct bytecode (invokestatic) from the trap scope. So after >> unrolling the host method (the inliner), the trap bytecode (i.e., the >> invokestati

Re: RFR: JDK-8322979: Add informative discussion to Modifier [v4]

2024-08-22 Thread Pavel Rappo
On Thu, 11 Jan 2024 09:38:50 GMT, Alan Bateman wrote: >> src/java.base/share/classes/java/lang/reflect/Modifier.java line 238: >> >>> 236: * modifiers of a class or member, source-level modifiers that do >>> 237: * not not have a constant in the this class should be >>> 238: * inc

Re: RFR: 8338417: Explicitly pin a virtual thread before acquiring the JFR string pool monitor [v5]

2024-08-22 Thread Erik Gahlin
On Wed, 21 Aug 2024 18:26:20 GMT, Markus Grönlund wrote: >> Greetings, >> >> Explicitly pin a virtual thread before acquiring the JFR string pool monitor >> because migrating a carrier thread local event writer object onto another >> carrier thread is impossible. >> >> During event commit, th

RFR: 8338690: CompactNumberInstance.format incorrectly formats some numbers (few vs many)

2024-08-22 Thread Naoto Sato
Fixing an issue wrt wrong plural suffix with compact format for some locales. It was retrieving the suffix based on the value before the rounding, which ended up in wrong plural expression. - Commit messages: - initial commit Changes: https://git.openjdk.org/jdk/pull/20680/files

Re: RFR: 8338745: Intrinsify Continuation.pin() and Continuation.unpin() [v3]

2024-08-22 Thread Vladimir Kozlov
On Thu, 22 Aug 2024 11:21:46 GMT, Markus Grönlund wrote: >> Is it an implicit invariant that execution always continues in the >> interpreter after an uncommon trap? I.e., I don't need to explicitly tell it >> to "re-execute" there? > > It is updated to use Action::none to keep the nmethod. The

Re: RFR: 8338745: Intrinsify Continuation.pin() and Continuation.unpin() [v3]

2024-08-22 Thread Vladimir Kozlov
On Thu, 22 Aug 2024 12:10:37 GMT, Markus Grönlund wrote: >> Greetings, >> >> Please help review this change set that implements C2 intrinsics for >> jdk.internal.vm.Continuation.pin() and jdk.internal.vm.Continuation.unpin(). >> >> This work is a consequence of >> [JDK-8338417](https://bugs.o

Re: RFR: 8338546: Speed up ConstantPoolBuilder::classEntry(ClassDesc) [v2]

2024-08-22 Thread Claes Redestad
On Thu, 22 Aug 2024 13:51:52 GMT, Chen Liang wrote: >> Ok, good. Maybe add a comment that this collection of descs deliberately >> omits primitive types since they would not usually end up in this code? > > Uh, I mean it's a class entry... and class file format prohibits primitives > in class e

Re: RFR: 8338546: Speed up ConstantPoolBuilder::classEntry(ClassDesc) [v2]

2024-08-22 Thread Chen Liang
On Thu, 22 Aug 2024 13:32:05 GMT, Claes Redestad wrote: >> Unfortunately primitive types aren't encoded by class entries, but accessed >> by getstatic on Wrapper's TYPE field. > > Ok, good. Maybe add a comment that this collection of descs deliberately > omits primitive types since they would n

Re: RFR: 8338546: Speed up ConstantPoolBuilder::classEntry(ClassDesc) [v2]

2024-08-22 Thread Claes Redestad
On Thu, 22 Aug 2024 13:35:28 GMT, Chen Liang wrote: >> Speed up `ConstantPoolBuilder::classEntry(ClassDesc)` by going through >> `ClassDesc` comparison and reusing descriptor hash to calculate internal >> name hash if possible. No suitable device to run benchmarks so need to find >> something

Re: RFR: 8338546: Speed up ConstantPoolBuilder::classEntry(ClassDesc) [v2]

2024-08-22 Thread Chen Liang
> Speed up `ConstantPoolBuilder::classEntry(ClassDesc)` by going through > `ClassDesc` comparison and reusing descriptor hash to calculate internal name > hash if possible. No suitable device to run benchmarks so need to find > something to run the new benchmark to ensure things work as intended

Re: RFR: 8338546: Speed up ConstantPoolBuilder::classEntry(ClassDesc) [v2]

2024-08-22 Thread Claes Redestad
On Thu, 22 Aug 2024 12:50:24 GMT, Chen Liang wrote: >> test/micro/org/openjdk/bench/jdk/classfile/ConstantPoolBuildingClassEntry.java >> line 64: >> >>> 62: builder = ConstantPoolBuilder.of(); >>> 63: classDescs = List.of( >>> 64: CD_Byte, CD_Object, CD_Long.arra

Re: RFR: 8338546: Speed up ConstantPoolBuilder::classEntry(ClassDesc)

2024-08-22 Thread Chen Liang
On Thu, 22 Aug 2024 11:54:48 GMT, Claes Redestad wrote: >> Speed up `ConstantPoolBuilder::classEntry(ClassDesc)` by going through >> `ClassDesc` comparison and reusing descriptor hash to calculate internal >> name hash if possible. No suitable device to run benchmarks so need to find >> someth

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace

2024-08-22 Thread Coleen Phillimore
On Thu, 22 Aug 2024 09:12:44 GMT, Thomas Stuefe wrote: >> This change stores InstanceKlass for interface and abstract classes in the >> non-class metaspace, since class metaspace will have limits on number of >> classes that can be represented when Lilliput changes go in. Classes that >> have

Re: RFR: 8338745: Intrinsify Continuation.pin() and Continuation.unpin() [v3]

2024-08-22 Thread Markus Grönlund
On Thu, 22 Aug 2024 11:27:27 GMT, Yudi Zheng wrote: >> Markus Grönlund has updated the pull request incrementally with one >> additional commit since the last revision: >> >> JVMCI exportation > > src/hotspot/share/opto/library_call.cpp line 3733: > >> 3731: // TLS >> 3732: Node* tls_ptr

Re: RFR: 8338745: Intrinsify Continuation.pin() and Continuation.unpin() [v3]

2024-08-22 Thread Markus Grönlund
> Greetings, > > Please help review this change set that implements C2 intrinsics for > jdk.internal.vm.Continuation.pin() and jdk.internal.vm.Continuation.unpin(). > > This work is a consequence of > [JDK-8338417](https://bugs.openjdk.org/browse/JDK-8338417), which required us > to introduce

Re: RFR: 8338546: Speed up ConstantPoolBuilder::classEntry(ClassDesc)

2024-08-22 Thread Claes Redestad
On Wed, 21 Aug 2024 22:27:02 GMT, Chen Liang wrote: > Speed up `ConstantPoolBuilder::classEntry(ClassDesc)` by going through > `ClassDesc` comparison and reusing descriptor hash to calculate internal name > hash if possible. No suitable device to run benchmarks so need to find > something to r

Re: RFR: 8331051: Add an `@since` checker test for `java.base` module [v11]

2024-08-22 Thread Nizar Benalla
On Fri, 28 Jun 2024 13:36:32 GMT, Nizar Benalla wrote: >> This checker checks the values of the `@since` tag found in the >> documentation comment for an element against the release in which the >> element first appeared. >> >> Real since value of an API element is computed as the oldest relea

Re: RFR: 8338745: Intrinsify Continuation.pin() and Continuation.unpin() [v2]

2024-08-22 Thread Yudi Zheng
On Thu, 22 Aug 2024 11:13:17 GMT, Markus Grönlund wrote: >> Greetings, >> >> Please help review this change set that implements C2 intrinsics for >> jdk.internal.vm.Continuation.pin() and jdk.internal.vm.Continuation.unpin(). >> >> This work is a consequence of >> [JDK-8338417](https://bugs.o

Re: RFR: 8338745: Intrinsify Continuation.pin() and Continuation.unpin() [v2]

2024-08-22 Thread Markus Grönlund
On Thu, 22 Aug 2024 09:24:18 GMT, Markus Grönlund wrote: >> The pattern of the uncommon trap construct was taken from the precedent in >> LibraryCallKit::inline_profileBoolean(). > > Is it an implicit invariant that execution always continues in the > interpreter after an uncommon trap? I.e., I

Re: RFR: 8338700: AttributeMapper type parameter should be bounded by Attribute

2024-08-22 Thread Chen Liang
On Wed, 21 Aug 2024 23:20:38 GMT, Chen Liang wrote: > A minor oversight in AttributeMapper type parameter bounds, that it should be > bounded by Attribute. Only real impact is in BoundAttribute.readAttributes > where a cast is now omitted, as other sites of access like > Attribute::attributeMa

Re: RFR: 8338745: Intrinsify Continuation.pin() and Continuation.unpin() [v2]

2024-08-22 Thread Markus Grönlund
> Greetings, > > Please help review this change set that implements C2 intrinsics for > jdk.internal.vm.Continuation.pin() and jdk.internal.vm.Continuation.unpin(). > > This work is a consequence of > [JDK-8338417](https://bugs.openjdk.org/browse/JDK-8338417), which required us > to introduce

Re: RFR: 8338745: Intrinsify Continuation.pin() and Continuation.unpin()

2024-08-22 Thread Markus Grönlund
On Thu, 22 Aug 2024 09:11:03 GMT, Markus Grönlund wrote: >> The functional requirement I have is that the branch takes an uncommon trap >> and restarts / re-executes the same method the interpreter, because that >> version enters the VM where an IllegalStateException is thrown. >> >> I don't

Re: RFR: 8338745: Intrinsify Continuation.pin() and Continuation.unpin()

2024-08-22 Thread Markus Grönlund
On Thu, 22 Aug 2024 09:09:52 GMT, Markus Grönlund wrote: >> Right, that would make sense to me because >> `Deoptimization::Action_reinterpret` might also invalidate the nmethod. > > The functional requirement I have is that the branch takes an uncommon trap > and restarts / re-executes the same

Re: RFR: 8338745: Intrinsify Continuation.pin() and Continuation.unpin()

2024-08-22 Thread Markus Grönlund
On Wed, 21 Aug 2024 21:19:03 GMT, Vladimir Kozlov wrote: >> Greetings, >> >> Please help review this change set that implements C2 intrinsics for >> jdk.internal.vm.Continuation.pin() and jdk.internal.vm.Continuation.unpin(). >> >> This work is a consequence of >> [JDK-8338417](https://bugs.o

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace

2024-08-22 Thread Thomas Stuefe
On Thu, 9 May 2024 13:51:09 GMT, Coleen Phillimore wrote: > This change stores InstanceKlass for interface and abstract classes in the > non-class metaspace, since class metaspace will have limits on number of > classes that can be represented when Lilliput changes go in. Classes that > have

Re: RFR: 8338745: Intrinsify Continuation.pin() and Continuation.unpin()

2024-08-22 Thread Markus Grönlund
On Thu, 22 Aug 2024 09:09:15 GMT, Tobias Hartmann wrote: >> A pin_count overflow/underflow should be a per-thread condition, not global. >> If there is nothing in the nmethod to be invalidated, maybe this should be >> `Action_none`? > > Right, that would make sense to me because > `Deoptimiza

Re: RFR: 8338745: Intrinsify Continuation.pin() and Continuation.unpin()

2024-08-22 Thread Tobias Hartmann
On Thu, 22 Aug 2024 07:14:29 GMT, Dean Long wrote: >> src/hotspot/share/opto/library_call.cpp line 3787: >> >>> 3785: set_all_memory(input_memory_state); >>> 3786: uncommon_trap_exact(Deoptimization::Reason_intrinsic, >>> 3787: Deoptimization::Action_reinterpret);

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-22 Thread Magnus Ihse Bursie
On Thu, 22 Aug 2024 02:46:34 GMT, David Holmes wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Also update build to link properly > > Sorry but I don't understand the point of changing build-time constructs

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-22 Thread Magnus Ihse Bursie
On Thu, 22 Aug 2024 00:30:07 GMT, Jiangli Zhou wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Also update build to link properly > > I compared the extracted changes in this PR with the related parts in > h

Re: RFR: 8338700: AttributeMapper type parameter should be bounded by Attribute

2024-08-22 Thread ExE Boss
On Wed, 21 Aug 2024 23:20:38 GMT, Chen Liang wrote: > A minor oversight in AttributeMapper type parameter bounds, that it should be > bounded by Attribute. Only real impact is in BoundAttribute.readAttributes > where a cast is now omitted, as other sites of access like > Attribute::attributeMa

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace

2024-08-22 Thread Roman Kennke
On Thu, 9 May 2024 13:51:09 GMT, Coleen Phillimore wrote: > This change stores InstanceKlass for interface and abstract classes in the > non-class metaspace, since class metaspace will have limits on number of > classes that can be represented when Lilliput changes go in. Classes that > have

Re: RFR: 8338745: Intrinsify Continuation.pin() and Continuation.unpin()

2024-08-22 Thread Dean Long
On Thu, 22 Aug 2024 05:47:23 GMT, Tobias Hartmann wrote: >> Greetings, >> >> Please help review this change set that implements C2 intrinsics for >> jdk.internal.vm.Continuation.pin() and jdk.internal.vm.Continuation.unpin(). >> >> This work is a consequence of >> [JDK-8338417](https://bugs.o