On Mon, 21 Sep 2020 05:31:59 GMT, David Holmes <dhol...@openjdk.org> wrote:

>> Robbin Ehn has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Fixed double checks
>>   Added NSV
>>   ProcessResult to enum
>>   Fixed logging
>>   Moved _active_handshaker to private
>
> src/hotspot/share/runtime/interfaceSupport.inline.hpp line 136:
> 
>> 134:     assert(_thread->thread_state() == _thread_in_vm, "should only call 
>> when leaving VM after handshake");
>> 135:
>> 136:     _thread->set_thread_state(_original_state);
> 
> Can you clarify why this is no longer needed? What states can we be returning 
> to?

You can never call SafepointMechanism::process_if_requested() while in any 
'safe-state' (as determine by
safepoint/handshake safe routines). We thus know we are transitioning from an 
unsafe state to an unsafe state, which
unsafe state might be seen by e.g. VM thread we care little about.

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

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

Reply via email to