src/hotspot/share/code/nmethod.cpp
changeset 53500 f618cfbaf35b
parent 53282 cb7fff9105a8
child 53641 c572eb605087
child 53651 0331b08811ad
equal deleted inserted replaced
53499:ca6f11c5acda 53500:f618cfbaf35b
  1098   // Make the class unloaded - i.e., change state and notify sweeper
  1098   // Make the class unloaded - i.e., change state and notify sweeper
  1099   assert(SafepointSynchronize::is_at_safepoint() || Thread::current()->is_ConcurrentGC_thread(),
  1099   assert(SafepointSynchronize::is_at_safepoint() || Thread::current()->is_ConcurrentGC_thread(),
  1100          "must be at safepoint");
  1100          "must be at safepoint");
  1101 
  1101 
  1102   // Unregister must be done before the state change
  1102   // Unregister must be done before the state change
  1103   Universe::heap()->unregister_nmethod(this);
  1103   {
       
  1104     MutexLockerEx ml(SafepointSynchronize::is_at_safepoint() ? NULL : CodeCache_lock,
       
  1105                      Mutex::_no_safepoint_check_flag);
       
  1106     Universe::heap()->unregister_nmethod(this);
       
  1107   }
  1104 
  1108 
  1105   // Log the unloading.
  1109   // Log the unloading.
  1106   log_state_change();
  1110   log_state_change();
  1107 
  1111 
  1108 #if INCLUDE_JVMCI
  1112 #if INCLUDE_JVMCI