8219718: ZGC: Make nmethod entry barriers and nmethod::is_unloading use ZNMethodDataOops
authoreosterlund
Wed, 17 Apr 2019 12:41:33 +0200
changeset 54567 224515275cf9
parent 54566 4224f26b2e7f
child 54568 b2ed96c35687
8219718: ZGC: Make nmethod entry barriers and nmethod::is_unloading use ZNMethodDataOops Reviewed-by: pliden, stefank
src/hotspot/share/gc/z/zBarrierSetNMethod.cpp
src/hotspot/share/gc/z/zUnload.cpp
--- 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();
   }
 };