< prev index next >

src/hotspot/share/jvmci/jvmciEnv.cpp

Print this page
*** 1748,11 ***
    set_HotSpotInstalledCode_codeStart(installed_code, (jlong) cb->code_begin());
    set_HotSpotInstalledCode_codeSize(installed_code, cb->code_size());
  }
  
  
! void JVMCIEnv::invalidate_nmethod_mirror(JVMCIObject mirror, bool deoptimize, nmethod::ChangeReason change_reason, JVMCI_TRAPS) {
    if (mirror.is_null()) {
      JVMCI_THROW(NullPointerException);
    }
  
    Thread* current = Thread::current();
--- 1748,11 ---
    set_HotSpotInstalledCode_codeStart(installed_code, (jlong) cb->code_begin());
    set_HotSpotInstalledCode_codeSize(installed_code, cb->code_size());
  }
  
  
! void JVMCIEnv::invalidate_nmethod_mirror(JVMCIObject mirror, bool deoptimize, nmethod::InvalidationReason invalidation_reason, JVMCI_TRAPS) {
    if (mirror.is_null()) {
      JVMCI_THROW(NullPointerException);
    }
  
    Thread* current = Thread::current();

*** 1771,20 ***
      return;
    }
  
    if (!deoptimize) {
      // Prevent future executions of the nmethod but let current executions complete.
!     nm->make_not_entrant(change_reason);
  
      // Do not clear the address field here as the Java code may still
      // want to later call this method with deoptimize == true. That requires
      // the address field to still be pointing at the nmethod.
     } else {
      // Deoptimize the nmethod immediately.
      DeoptimizationScope deopt_scope;
      deopt_scope.mark(nm);
!     nm->make_not_entrant(change_reason);
      nm->make_deoptimized();
      deopt_scope.deoptimize_marked();
  
      // A HotSpotNmethod instance can only reference a single nmethod
      // during its lifetime so simply clear it here.
--- 1771,20 ---
      return;
    }
  
    if (!deoptimize) {
      // Prevent future executions of the nmethod but let current executions complete.
!     nm->make_not_entrant(invalidation_reason);
  
      // Do not clear the address field here as the Java code may still
      // want to later call this method with deoptimize == true. That requires
      // the address field to still be pointing at the nmethod.
     } else {
      // Deoptimize the nmethod immediately.
      DeoptimizationScope deopt_scope;
      deopt_scope.mark(nm);
!     nm->make_not_entrant(invalidation_reason);
      nm->make_deoptimized();
      deopt_scope.deoptimize_marked();
  
      // A HotSpotNmethod instance can only reference a single nmethod
      // during its lifetime so simply clear it here.
< prev index next >