On Mon, 1 Nov 2021 01:55:48 GMT, David Holmes <dhol...@openjdk.org> wrote:

>> Ummmm... The purpose of the new `is_exiting()` check and the baseline's
>> `ThreadsListHandle::includes()` check is to avoid making this call:
>> 
>>   return this->handshake_state()->suspend();
>> 
>> The call we are avoiding is the one that makes the synchronous
>> SuspendThreadHandshake request (for threads other than self)
>> so by detecting the exiting thread early, we are avoiding entering
>> the handshake machinery.
>
> But why do we care about that? The low-level mechanism handles exiting 
> threads so there is no need for the higher-level code to do that. The current 
> logic gives the appearance that we must filter out exiting threads at this 
> level because the lower-level code does not handle them.

Okay you've convinced me. I'm merging my latest patch with master
and then I'll retest with the is_exiting() check removed.

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

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

Reply via email to