Stack walking performance issue

Stefan Karlsson stefan.karlsson at oracle.com
Mon Mar 18 13:59:01 UTC 2019


On 2019-03-18 14:48, Andrew Haley wrote:
> On 3/18/19 11:33 AM, Stefan Karlsson wrote:
>> In ZGC (in JDK 11), we actually do clean out the "weak" pointers in the
>> ResolvedMethodTable, but we do not remove the entries. Therefore, if you
>> do a lot of stack walking and throw away the StackFrameInfos, the
>> ResolvedMethodTable will fill up with cleared entries pointing to NULL.
> 
> That's got to be easily fixable, surely?
> 

Yes. It should be enough to call ResolvedMethodTable::unlink() in the 
mark end phase. However, that has the potential to increase the time of 
that pause. So for JDK 12, we've opted to send a signal to the 
ServiceThread, and let that thread execute the unlinking concurrently 
with the Java threads.


More information about the zgc-dev mailing list