diff src/share/vm/ci/ciEnv.cpp @ 13451:02f27ecb4f3a

Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author Doug Simon <doug.simon@oracle.com>
date Wed, 18 Dec 2013 00:00:24 +0100
parents 096c224171c4 938e1e64e28f
children d8041d695d19
line wrap: on
line diff
--- a/src/share/vm/ci/ciEnv.cpp	Tue Dec 17 22:37:03 2013 +0100
+++ b/src/share/vm/ci/ciEnv.cpp	Wed Dec 18 00:00:24 2013 +0100
@@ -1003,21 +1003,15 @@
     // Free codeBlobs
     code_buffer->free_blob();
 
-    if (nm == NULL) {
-      // The CodeCache is full.  Print out warning and disable compilation.
-      record_failure("code cache is full");
-      {
-        MutexUnlocker ml(Compile_lock);
-        MutexUnlocker locker(MethodCompileQueue_lock);
-        CompileBroker::handle_full_code_cache();
-      }
-    } else {
+    if (nm != NULL) {
       nm->set_has_unsafe_access(has_unsafe_access);
       nm->set_has_wide_vectors(has_wide_vectors);
 
       // Record successful registration.
       // (Put nm into the task handle *before* publishing to the Java heap.)
-      if (task() != NULL)  task()->set_code(nm);
+      if (task() != NULL) {
+        task()->set_code(nm);
+      }
 
       if (entry_bci == InvocationEntryBci) {
         if (TieredCompilation) {
@@ -1055,12 +1049,16 @@
         method->method_holder()->add_osr_nmethod(nm);
       }
     }
-  }
-  // JVMTI -- compiled method notification (must be done outside lock)
+  }  // safepoints are allowed again
+
   if (nm != NULL) {
+    // JVMTI -- compiled method notification (must be done outside lock)
     nm->post_compiled_method_load_event();
+  } else {
+    // The CodeCache is full. Print out warning and disable compilation.
+    record_failure("code cache is full");
+    CompileBroker::handle_full_code_cache();
   }
-
 }