On Wed, 21 Aug 2024 21:19:03 GMT, Vladimir Kozlov <k...@openjdk.org> 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.openjdk.org/browse/JDK-8338417), which required 
>> us to introduce explicit pin constructs for Virtual threads in a relatively 
>> performance-sensitive path.
>> 
>> Testing: jdk_jfr, loom testing
>> 
>> Comment: I changed the type of the ContinuationEntry::_pin_count field from 
>> uint to uin32_t to make the size explicit and to access it uniformly from 
>> the intrinsic code using T_INT.
>> 
>> Thanks
>> Markus
>
> src/hotspot/share/opto/library_call.cpp line 3815:
> 
>> 3813: bool LibraryCallKit::inline_native_Continuation_unpin() {
>> 3814:   return inline_native_Continuation_pinning_shared_impl(true);
>> 3815: }
> 
> I don't see the need these 2 methods. You can directly call 
> inline_native_Continuation_pinning_shared_impl() in switch in try_to_inline() 
> and pass true or false there.
> You may also rename it to `inline_native_Continuation_pinning()`.

Ok.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20664#discussion_r1726670122

Reply via email to