提交 f4f1f417 编写于 作者: N never

6968336: VM crash guarantee(!nm->is_zombie()) failed: cannot lock a zombie method

Reviewed-by: twisti
上级 c5224ef9
...@@ -118,7 +118,6 @@ void CodeBlobCollector::do_blob(CodeBlob* cb) { ...@@ -118,7 +118,6 @@ void CodeBlobCollector::do_blob(CodeBlob* cb) {
for (int i=0; i<_global_code_blobs->length(); i++) { for (int i=0; i<_global_code_blobs->length(); i++) {
JvmtiCodeBlobDesc* scb = _global_code_blobs->at(i); JvmtiCodeBlobDesc* scb = _global_code_blobs->at(i);
if (addr == scb->code_begin()) { if (addr == scb->code_begin()) {
ShouldNotReachHere();
return; return;
} }
} }
...@@ -206,11 +205,11 @@ jvmtiError JvmtiCodeBlobEvents::generate_compiled_method_load_events(JvmtiEnv* e ...@@ -206,11 +205,11 @@ jvmtiError JvmtiCodeBlobEvents::generate_compiled_method_load_events(JvmtiEnv* e
MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
nmethod* current = CodeCache::first_nmethod(); nmethod* current = CodeCache::first_nmethod();
while (current != NULL) { while (current != NULL) {
// Lock the nmethod so it can't be freed
nmethodLocker nml(current);
// Only notify for live nmethods // Only notify for live nmethods
if (current->is_alive()) { if (current->is_alive()) {
// Lock the nmethod so it can't be freed
nmethodLocker nml(current);
// Don't hold the lock over the notify or jmethodID creation // Don't hold the lock over the notify or jmethodID creation
MutexUnlockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); MutexUnlockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
current->get_and_cache_jmethod_id(); current->get_and_cache_jmethod_id();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册