8234009: ZGC: Move resurrection unblock to before the _unload.purge() call
Reviewed-by: pliden, eosterlund
--- a/src/hotspot/share/gc/z/zHeap.cpp Mon Nov 25 14:56:15 2019 +0100
+++ b/src/hotspot/share/gc/z/zHeap.cpp Mon Nov 25 14:57:03 2019 +0100
@@ -352,12 +352,12 @@
ZRendezvousClosure cl;
Handshake::execute(&cl);
+ // Unblock resurrection of weak/phantom references
+ ZResurrection::unblock();
+
// Purge stale metadata and nmethods that were unlinked
_unload.purge();
- // Unblock resurrection of weak/phantom references
- ZResurrection::unblock();
-
// Enqueue Soft/Weak/Final/PhantomReferences. Note that this
// must be done after unblocking resurrection. Otherwise the
// Finalizer thread could call Reference.get() on the Finalizers