RFR: 8275950: Use only _thread_in_vm in ~ThreadBlockInVMPreprocess() [v3]

Patricio Chilano Mateo pchilanomate at openjdk.java.net
Mon Nov 1 14:38:51 UTC 2021


On Mon, 1 Nov 2021 14:16:52 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

>> Patricio Chilano Mateo has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fix comment in ~ThreadBlockInVMPreprocess()
>
> src/hotspot/share/runtime/safepoint.cpp line 709:
> 
>> 707: 
>> 708:   JavaThreadState state = thread->thread_state();
>> 709:   assert(is_a_block_safe_state(state), "Illegal threadstate encountered: %d", state);
> 
> Getting rid of this assert makes me a bit nervous, but I have to
> get used to the fact that @pchilano is making the safepointing
> sub-system simpler and simpler...

I thought about keeping it but not only we have a single caller(SafepointMechanism::process()) which already has that assert as a guarantee, but also there is no way to add new callers without basically copying all the logic from SafepointMechanism::process() since we cannot just call SS::block().

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

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


More information about the hotspot-runtime-dev mailing list