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

Markus Grönlund mgronlun at openjdk.org
Thu Aug 22 12:10:38 UTC 2024


On Thu, 22 Aug 2024 11:27:27 GMT, Yudi Zheng <yzheng at openjdk.org> 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 = _gvn.transform(new ThreadLocalNode());
>> 3733:   Node* last_continuation_offset = basic_plus_adr(top(), tls_ptr, in_bytes(JavaThread::cont_entry_offset()));
> 
> Could you please export `JavaThread::_cont_entry` and `ContinuationEntry::_pin_count` to JVMCI? Thanks!
> 
> diff --git a/src/hotspot/share/jvmci/vmStructs_jvmci.cpp b/src/hotspot/share/jvmci/vmStructs_jvmci.cpp
> index 688691fb976..a25ecd2bab5 100644
> --- a/src/hotspot/share/jvmci/vmStructs_jvmci.cpp
> +++ b/src/hotspot/share/jvmci/vmStructs_jvmci.cpp
> @@ -35,6 +35,7 @@
>  #include "oops/methodCounters.hpp"
>  #include "oops/objArrayKlass.hpp"
>  #include "prims/jvmtiThreadState.hpp"
> +#include "runtime/continuationEntry.hpp"
>  #include "runtime/deoptimization.hpp"
>  #include "runtime/flags/jvmFlag.hpp"
>  #include "runtime/osThread.hpp"
> @@ -244,10 +245,13 @@
>    nonstatic_field(JavaThread,                  _held_monitor_count,                           intx)                                  \
>    nonstatic_field(JavaThread,                  _lock_stack,                                   LockStack)                             \
>    nonstatic_field(JavaThread,                  _om_cache,                                     OMCache)                               \
> +  nonstatic_field(JavaThread,                  _cont_entry,                                   ContinuationEntry*)                    \
>    JVMTI_ONLY(nonstatic_field(JavaThread,       _is_in_VTMS_transition,                        bool))                                 \
>    JVMTI_ONLY(nonstatic_field(JavaThread,       _is_in_tmp_VTMS_transition,                    bool))                                 \
>    JVMTI_ONLY(nonstatic_field(JavaThread,       _is_disable_suspend,                           bool))                                 \
>                                                                                                                                       \
> +  nonstatic_field(ContinuationEntry,           _pin_count,                                    uint32_t)                              \
> +                                                                                                                                     \
>    nonstatic_field(LockStack,                   _top,                                          uint32_t)                              \
>                                                                                                        ...

Done (only tested that it builds).

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

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


More information about the core-libs-dev mailing list