8219718: ZGC: Make nmethod entry barriers and nmethod::is_unloading use ZNMethodDataOops

Reviewed-by: pliden, stefank
This commit is contained in:
Erik Österlund 2019-04-17 12:41:33 +02:00
parent 11e6f439e0
commit dce0c5c4ae
2 changed files with 2 additions and 6 deletions

View File

@ -55,11 +55,7 @@ bool ZBarrierSetNMethod::nmethod_entry_barrier(nmethod* nm) {
// Heal oops and disarm
ZNMethodOopClosure cl;
nm->oops_do(&cl);
nm->fix_oop_relocations();
OrderAccess::release();
ZNMethod::nmethod_oops_do(nm, &cl);
disarm(nm);
return true;

View File

@ -71,7 +71,7 @@ public:
ZReentrantLock* const lock = ZNMethod::lock_for_nmethod(nm);
ZLocker<ZReentrantLock> locker(lock);
ZIsUnloadingOopClosure cl;
nm->oops_do(&cl, true /* allow_zombie */);
ZNMethod::nmethod_oops_do(nm, &cl);
return cl.is_unloading();
}
};