On Tue, 30 Mar 2021 09:33:19 GMT, Richard Reingruber <rr...@openjdk.org> 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 two commits: >> >> - Merge branch 'master' into SuspendInHandshake >> - 8257831: Suspend with handshake (review baseline) > > 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`. ------------- PR: https://git.openjdk.java.net/jdk/pull/3191