8219718: ZGC: Make nmethod entry barriers and nmethod::is_unloading use ZNMethodDataOops
Reviewed-by: pliden, stefank
--- a/src/hotspot/share/gc/z/zBarrierSetNMethod.cpp Mon Apr 15 06:41:02 2019 -0700
+++ b/src/hotspot/share/gc/z/zBarrierSetNMethod.cpp Wed Apr 17 12:41:33 2019 +0200
@@ -55,11 +55,7 @@
// 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;
--- a/src/hotspot/share/gc/z/zUnload.cpp Mon Apr 15 06:41:02 2019 -0700
+++ b/src/hotspot/share/gc/z/zUnload.cpp Wed Apr 17 12:41:33 2019 +0200
@@ -71,7 +71,7 @@
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();
}
};