src/hotspot/share/gc/z/zNMethod.cpp
changeset 58353 146bb7afdcf4
parent 58226 408c445d04e8
child 58679 9c3209ff7550
child 59248 e92153ed8bdc
equal deleted inserted replaced
58352:3a5f417e68a1 58353:146bb7afdcf4
   292 
   292 
   293     if (!nm->is_alive()) {
   293     if (!nm->is_alive()) {
   294       return;
   294       return;
   295     }
   295     }
   296 
   296 
   297     ZLocker<ZReentrantLock> locker(ZNMethod::lock_for_nmethod(nm));
       
   298 
       
   299     if (nm->is_unloading()) {
   297     if (nm->is_unloading()) {
       
   298       ZLocker<ZReentrantLock> locker(ZNMethod::lock_for_nmethod(nm));
   300       unlink(nm);
   299       unlink(nm);
   301       return;
   300       return;
   302     }
   301     }
       
   302 
       
   303     ZLocker<ZReentrantLock> locker(ZNMethod::lock_for_nmethod(nm));
   303 
   304 
   304     // Heal oops and disarm
   305     // Heal oops and disarm
   305     ZNMethodOopClosure cl;
   306     ZNMethodOopClosure cl;
   306     ZNMethod::nmethod_oops_do(nm, &cl);
   307     ZNMethod::nmethod_oops_do(nm, &cl);
   307     ZNMethod::disarm_nmethod(nm);
   308     ZNMethod::disarm_nmethod(nm);