RFR: 8238761: Asynchronous handshakes [v2]

Robbin Ehn rehn at openjdk.java.net
Mon Sep 21 11:14:29 UTC 2020


On Mon, 21 Sep 2020 05:31:59 GMT, David Holmes <dholmes at 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


More information about the hotspot-runtime-dev mailing list