RFR: 8234009: ZGC: Move resurrection unblock to before the _unload.purge() call
stefan.karlsson at oracle.com
Fri Nov 22 11:15:45 UTC 2019
On 2019-11-22 12:09, erik.osterlund at oracle.com wrote:
> Hi Stefan,
> Looks good.
> On 11/21/19 2:28 PM, Stefan Karlsson wrote:
>> Hi all,
>> Please review this patch to move the resurrection to before the
>> _unload.purge() call.
>> After JDK-8230661 we are guaranteed that no mutator holds a weak oop
>> containing a "dead" object when the ZResurrection::unblock() call
>> Therefore, it doesn't matter if the load barrier that the thread
>> executes runs the code guarded by ZResurrection::is_blocked() or the
>> "non-blocked" part, when ZResurrection::unblock() changes the state.
>> As long as the ZResurrection::unblock() call happens after the
>> handshake, we are good to go.
>> Today, we perform the purging and deletion of metadata in
>> _unload.purge(), and call ZResurrection:unblock() after that. There's
>> no need to delay the unblocking to after the purge. We have the
>> opportunity to shrink the resurrection-blocked window by moving the
>> ZResurrection::unblock() call to before the call to _unload.purge(),
>> but still after the handshake.
More information about the hotspot-gc-dev