RFR: 8257831: Suspend with handshakes [v2]

Robbin Ehn rehn at openjdk.java.net
Tue Apr 6 09:08:32 UTC 2021


On Tue, 30 Mar 2021 13:38:59 GMT, Richard Reingruber <rrich at openjdk.org> wrote:

>> src/hotspot/share/runtime/handshake.cpp line 617:
>> 
>>> 615:     {
>>> 616:       MutexLocker ml(&_lock, Mutex::_no_safepoint_check_flag);
>>> 617:       if (!is_suspend_requested()) {
>> 
>> The current thread is _thread_in_vm. Can it be suspended then? For a suspend it has to be in a safe thread state which it cannot leave while suspended. So it must have reached _thread_in_vm not suspended and it cannot be suspended while in that state.
>
> Shouldn't `is_suspend_requested()` be replaced with `is_suspended()`? See also comment on declaration of `_suspend_requested`.

Your are right. Doing a different version. Need some testing.

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

PR: https://git.openjdk.java.net/jdk/pull/3191


More information about the serviceability-dev mailing list