< prev index next >

src/hotspot/share/c1/c1_Runtime1.cpp

Print this page
*** 816,11 ***
    assert(nm == CodeCache::find_nmethod(caller_frame.pc()), "Should be the same");
    Deoptimization::DeoptAction action = Deoptimization::trap_request_action(trap_request);
    Deoptimization::DeoptReason reason = Deoptimization::trap_request_reason(trap_request);
  
    if (action == Deoptimization::Action_make_not_entrant) {
!     if (nm->make_not_entrant("C1 deoptimize")) {
        if (reason == Deoptimization::Reason_tenured) {
          MethodData* trap_mdo = Deoptimization::get_method_data(current, method, true /*create_if_missing*/);
          if (trap_mdo != nullptr) {
            trap_mdo->inc_tenure_traps();
          }
--- 816,11 ---
    assert(nm == CodeCache::find_nmethod(caller_frame.pc()), "Should be the same");
    Deoptimization::DeoptAction action = Deoptimization::trap_request_action(trap_request);
    Deoptimization::DeoptReason reason = Deoptimization::trap_request_reason(trap_request);
  
    if (action == Deoptimization::Action_make_not_entrant) {
!     if (nm->make_not_entrant(nmethod::InvalidationReason::C1_DEOPTIMIZE)) {
        if (reason == Deoptimization::Reason_tenured) {
          MethodData* trap_mdo = Deoptimization::get_method_data(current, method, true /*create_if_missing*/);
          if (trap_mdo != nullptr) {
            trap_mdo->inc_tenure_traps();
          }

*** 1108,11 ***
  
      // It's possible the nmethod was invalidated in the last
      // safepoint, but if it's still alive then make it not_entrant.
      nmethod* nm = CodeCache::find_nmethod(caller_frame.pc());
      if (nm != nullptr) {
!       nm->make_not_entrant("C1 code patch");
      }
  
      Deoptimization::deoptimize_frame(current, caller_frame.id());
  
      // Return to the now deoptimized frame.
--- 1108,11 ---
  
      // It's possible the nmethod was invalidated in the last
      // safepoint, but if it's still alive then make it not_entrant.
      nmethod* nm = CodeCache::find_nmethod(caller_frame.pc());
      if (nm != nullptr) {
!       nm->make_not_entrant(nmethod::InvalidationReason::C1_CODEPATCH);
      }
  
      Deoptimization::deoptimize_frame(current, caller_frame.id());
  
      // Return to the now deoptimized frame.

*** 1356,11 ***
  
    if (is_patching_needed(current, stub_id)) {
      // Make sure the nmethod is invalidated, i.e. made not entrant.
      nmethod* nm = CodeCache::find_nmethod(caller_frame.pc());
      if (nm != nullptr) {
!       nm->make_not_entrant("C1 deoptimize for patching");
      }
    }
  
    Deoptimization::deoptimize_frame(current, caller_frame.id());
    // Return to the now deoptimized frame.
--- 1356,11 ---
  
    if (is_patching_needed(current, stub_id)) {
      // Make sure the nmethod is invalidated, i.e. made not entrant.
      nmethod* nm = CodeCache::find_nmethod(caller_frame.pc());
      if (nm != nullptr) {
!       nm->make_not_entrant(nmethod::InvalidationReason::C1_DEOPTIMIZE_FOR_PATCHING);
      }
    }
  
    Deoptimization::deoptimize_frame(current, caller_frame.id());
    // Return to the now deoptimized frame.

*** 1484,11 ***
    frame runtime_frame = current->last_frame();
    frame caller_frame = runtime_frame.sender(&reg_map);
  
    nmethod* nm = CodeCache::find_nmethod(caller_frame.pc());
    assert (nm != nullptr, "no more nmethod?");
!   nm->make_not_entrant("C1 predicate failed trap");
  
    methodHandle m(current, nm->method());
    MethodData* mdo = m->method_data();
  
    if (mdo == nullptr && !HAS_PENDING_EXCEPTION) {
--- 1484,11 ---
    frame runtime_frame = current->last_frame();
    frame caller_frame = runtime_frame.sender(&reg_map);
  
    nmethod* nm = CodeCache::find_nmethod(caller_frame.pc());
    assert (nm != nullptr, "no more nmethod?");
!   nm->make_not_entrant(nmethod::InvalidationReason::C1_PREDICATE_FAILED_TRAP);
  
    methodHandle m(current, nm->method());
    MethodData* mdo = m->method_data();
  
    if (mdo == nullptr && !HAS_PENDING_EXCEPTION) {
< prev index next >