< prev index next >

src/hotspot/share/gc/z/zNMethod.cpp

Print this page
*** 20,10 ***
--- 20,11 ---
   * or visit www.oracle.com if you need additional information or have any
   * questions.
   */
  
  #include "precompiled.hpp"
+ #include "code/compiledMethod.inline.hpp"
  #include "code/relocInfo.hpp"
  #include "code/nmethod.hpp"
  #include "code/icBuffer.hpp"
  #include "gc/shared/barrierSet.hpp"
  #include "gc/shared/barrierSetNMethod.hpp"

*** 204,10 ***
--- 205,17 ---
  void ZNMethod::disarm(nmethod* nm) {
    BarrierSetNMethod* const bs = BarrierSet::barrier_set()->barrier_set_nmethod();
    bs->disarm(nm);
  }
  
+ void ZNMethod::arm(nmethod* nm, int arm_value) {
+   BarrierSetNMethod* const bs = BarrierSet::barrier_set()->barrier_set_nmethod();
+   if (bs != NULL) {
+     bs->arm(nm, arm_value);
+   }
+ }
+ 
  void ZNMethod::nmethod_oops_do(nmethod* nm, OopClosure* cl) {
    ZLocker<ZReentrantLock> locker(ZNMethod::lock_for_nmethod(nm));
    if (!nm->is_alive()) {
      return;
    }

*** 329,11 ***
      ZLocker<ZReentrantLock> locker(ZNMethod::lock_for_nmethod(nm));
  
      if (ZNMethod::is_armed(nm)) {
        // Heal oops and disarm
        ZNMethod::nmethod_oops_barrier(nm);
!       ZNMethod::disarm(nm);
      }
  
      // Clear compiled ICs and exception caches
      if (!nm->unload_nmethod_caches(_unloading_occurred)) {
        set_failed();
--- 337,11 ---
      ZLocker<ZReentrantLock> locker(ZNMethod::lock_for_nmethod(nm));
  
      if (ZNMethod::is_armed(nm)) {
        // Heal oops and disarm
        ZNMethod::nmethod_oops_barrier(nm);
!       ZNMethod::arm(nm, 0);
      }
  
      // Clear compiled ICs and exception caches
      if (!nm->unload_nmethod_caches(_unloading_occurred)) {
        set_failed();
< prev index next >