On Wed, 31 Mar 2021 06:42:27 GMT, David Holmes <[email protected]> wrote:
>> Robbin Ehn has updated the pull request with a new target base due to a
>> merge or a rebase. The pull request now contains three commits:
>>
>> - Merge branch 'master' into SuspendInHandshake
>> - Merge branch 'master' into SuspendInHandshake
>> - 8257831: Suspend with handshake (review baseline)
>
> src/hotspot/share/runtime/thread.cpp line 2105:
>
>> 2103: if (is_external_suspend()) {
>> 2104: java_suspend_self();
>> 2105: }
>
> It is not at all clear to me how this method should interact with thread
> suspension ??
In JavaThread::wait_for_object_deoptimization() the current thread can
transition to the safe state _thread_blocked. In that state it can be
suspended. In the baseline version wait_for_object_deoptimization() checks for
suspension explicitly and self suspends if positive. With this enhancement it
happens implicitly by calling SafepointMechanism::process_if_requested().
-------------
PR: https://git.openjdk.java.net/jdk/pull/3191