8234009: ZGC: Move resurrection unblock to before the _unload.purge() call

Reviewed-by: pliden, eosterlund
This commit is contained in:
Stefan Karlsson 2019-11-25 14:57:03 +01:00
parent 265e2f13aa
commit e36fa7783f

View File

@ -352,12 +352,12 @@ void ZHeap::process_non_strong_references() {
ZRendezvousClosure cl; ZRendezvousClosure cl;
Handshake::execute(&cl); Handshake::execute(&cl);
// Purge stale metadata and nmethods that were unlinked
_unload.purge();
// Unblock resurrection of weak/phantom references // Unblock resurrection of weak/phantom references
ZResurrection::unblock(); ZResurrection::unblock();
// Purge stale metadata and nmethods that were unlinked
_unload.purge();
// Enqueue Soft/Weak/Final/PhantomReferences. Note that this // Enqueue Soft/Weak/Final/PhantomReferences. Note that this
// must be done after unblocking resurrection. Otherwise the // must be done after unblocking resurrection. Otherwise the
// Finalizer thread could call Reference.get() on the Finalizers // Finalizer thread could call Reference.get() on the Finalizers