RFR: 8234662: Sweeper should keep current nmethod alive before yielding for ICStub refills

erik.osterlund at oracle.com erik.osterlund at oracle.com
Tue Dec 3 13:19:23 UTC 2019


Hi Stefan,

Thanks for the review.

/Erik

On 12/3/19 2:15 PM, Stefan Karlsson wrote:
> Looks good.
>
> StefanK
>
> On 2019-11-22 16:03, erik.osterlund at oracle.com wrote:
>> Hi,
>>
>> Today, when GCs scan the stack, all nmethods roots found from threads 
>> are nmethods that have gone through an nmethod entry barrier (in the 
>> case of concurrent class unloading), except the super special sweeper 
>> nmethod that is currently being processed when it runs out of ICStubs 
>> and need to safepoint to refill ICStubs, which with the fantastic 
>> safepoint coalescing optimization that we all know and love, can get 
>> fused into a GC safepoint, which will find the sweeper nmethod and be 
>> confused why it has not gone through an entry barrier before it 
>> yielded to the safepoint like everyone else.
>>
>> This causes some headache, and I would like to harmonize this better 
>> by simply calling the nmethod entry barrier on that nmethod in the 
>> sweeper, before yielding to the safepoint. Then there is no need to 
>> treat it as a special case.
>>
>> Bug:
>> https://bugs.openjdk.java.net/browse/JDK-8234662
>>
>> Webrev:
>> http://cr.openjdk.java.net/~eosterlund/8234662/webrev.00/
>>
>> Thanks.
>> /Erik



More information about the hotspot-dev mailing list