diff --git a/src/hotspot/share/gc/z/zHeap.cpp b/src/hotspot/share/gc/z/zHeap.cpp index 9d50b863924..c6c3c0ca6c0 100644 --- a/src/hotspot/share/gc/z/zHeap.cpp +++ b/src/hotspot/share/gc/z/zHeap.cpp @@ -352,12 +352,12 @@ void ZHeap::process_non_strong_references() { ZRendezvousClosure cl; Handshake::execute(&cl); - // Purge stale metadata and nmethods that were unlinked - _unload.purge(); - // Unblock resurrection of weak/phantom references ZResurrection::unblock(); + // Purge stale metadata and nmethods that were unlinked + _unload.purge(); + // 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