equal
deleted
inserted
replaced
1087 // OSR methods point to the Method*, but the Method* does not |
1087 // OSR methods point to the Method*, but the Method* does not |
1088 // point back! |
1088 // point back! |
1089 if (_method->code() == this) { |
1089 if (_method->code() == this) { |
1090 _method->clear_code(); // Break a cycle |
1090 _method->clear_code(); // Break a cycle |
1091 } |
1091 } |
1092 _method = NULL; // Clear the method of this dead nmethod |
|
1093 } |
1092 } |
1094 |
1093 |
1095 // Make the class unloaded - i.e., change state and notify sweeper |
1094 // Make the class unloaded - i.e., change state and notify sweeper |
1096 assert(SafepointSynchronize::is_at_safepoint() || Thread::current()->is_ConcurrentGC_thread(), |
1095 assert(SafepointSynchronize::is_at_safepoint() || Thread::current()->is_ConcurrentGC_thread(), |
1097 "must be at safepoint"); |
1096 "must be at safepoint"); |
1106 { |
1105 { |
1107 MutexLockerEx ml(SafepointSynchronize::is_at_safepoint() ? NULL : CodeCache_lock, |
1106 MutexLockerEx ml(SafepointSynchronize::is_at_safepoint() ? NULL : CodeCache_lock, |
1108 Mutex::_no_safepoint_check_flag); |
1107 Mutex::_no_safepoint_check_flag); |
1109 Universe::heap()->unregister_nmethod(this); |
1108 Universe::heap()->unregister_nmethod(this); |
1110 } |
1109 } |
|
1110 |
|
1111 // Clear the method of this dead nmethod |
|
1112 set_method(NULL); |
1111 |
1113 |
1112 // Log the unloading. |
1114 // Log the unloading. |
1113 log_state_change(); |
1115 log_state_change(); |
1114 |
1116 |
1115 #if INCLUDE_JVMCI |
1117 #if INCLUDE_JVMCI |