RFR: 8257831: Suspend with handshakes [v2]

David Holmes dholmes at openjdk.java.net
Tue Apr 13 02:28:18 UTC 2021


On Wed, 7 Apr 2021 07:20:15 GMT, Robbin Ehn <rehn at openjdk.org> wrote:

>> src/hotspot/share/prims/jvmtiRawMonitor.cpp line 428:
>> 
>>> 426:       jt->set_thread_state_fence(_thread_in_native_trans);
>>> 427:       SafepointMechanism::process_if_requested(jt);
>>> 428:       if (jt->is_interrupted(true)) {
>> 
>> A thread must be _thread_in_vm to safely query is_interrupted() as it accesses the threadObj.
>
> Any unsafe (not native/blocked) is fine, therefore I never completed the transition.
> I set the state to _thread_in_vm before.

Sorry I was misremembering the restriction, please remove the transition to _thread_in_vm again (it messes up the comments at lines 436 and 437.)

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

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


More information about the serviceability-dev mailing list