8234009: ZGC: Move resurrection unblock to before the _unload.purge() call
authorstefank
Mon, 25 Nov 2019 14:57:03 +0100
changeset 59254 58f842703bc5
parent 59253 1647ed87bf1e
child 59255 a74627659f96
8234009: ZGC: Move resurrection unblock to before the _unload.purge() call Reviewed-by: pliden, eosterlund
src/hotspot/share/gc/z/zHeap.cpp
--- 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