RFR(s): 8252414: Redundant suspend check when determining if a java thread is safe

Robbin Ehn robbin.ehn at oracle.com
Fri Aug 28 07:50:30 UTC 2020


Hi Coleen,

On 2020-08-28 01:23, Coleen Phillimore wrote:
> 
> In this change, the little function account_safe_thread() is only called 
> in one place now.  Should it be inlined?

No, the method contains the actions needed to tick a thread off for 
safepoint, which is nice to have confined to a method.

> 
> The change looks good to me.

Thanks, Robbin

> 
> Thanks,
> Coleen
> 
> On 8/27/20 3:21 AM, Robbin Ehn wrote:
>> Hi all, please review.
>>
>> In 8221207 - "Redo JDK-8218446 - SuspendAtExit hangs" we fixed so a
>> thread is always blocked when suspended.
>>
>> And added this nice assert.
>> int JavaThread::java_suspend_self() {
>>   assert(thread_state() == _thread_blocked, "wrong state for 
>> java_suspend_self()");
>>
>> When checking if a thread is safepoint/handshake safe there no need to 
>> look at ext suspend flag anymore, since the thread is blocked.
>>
>> Bug:
>> https://bugs.openjdk.java.net/browse/JDK-8252414
>> Code:
>> http://cr.openjdk.java.net/~rehn/8252414/webrev/index.html
>>
>> Passes t1-5
>>
>> Thanks, Robbin
> 


More information about the hotspot-runtime-dev mailing list