On Tue, 30 Mar 2021 19:49:45 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/safepointMechanism.cpp line 101: > >> 99: !thread->handshake_state()->process_by_self()) { >> 100: need_rechecking = true; >> 101: } > > What about this version > if (thread->handshake_state()->should_process()) { > need_rechecking = !thread->handshake_state()->process_by_self(); > } > or even > need_rechecking = > thread->handshake_state()->should_process() && > !thread->handshake_state()->process_by_self(); > With the latter you could eliminate L82 > need_rechecking = false; > Also I'd find it more natural if `process_by_self()` could return true if > rechecking is needed. Fixed ------------- PR: https://git.openjdk.java.net/jdk/pull/3191