Stack walking performance issue
amirhadadi at hotmail.com
Mon Mar 18 21:32:35 UTC 2019
If anyone is willing to build an Open JDK with this fix I can give it a spin.
From: Andrew Haley <aph at redhat.com>
Sent: Monday, March 18, 2019 5:30 PM
To: Stefan Karlsson; Amir Hadadi; zgc-dev at openjdk.java.net
Subject: Re: Stack walking performance issue
On 3/18/19 1:59 PM, Stefan Karlsson wrote:
> 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.
For JDK 11, I guess the severe slowdown is more severe than the extended
pause time. I invite someone (anyone?) to try doing what you suggest.
Amir, can you build and test it?
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the zgc-dev