hotspot/src/share/vm/ci/ciEnv.cpp
changeset 21727 4a5fc611c9a7
parent 21572 9cd0dd352fcd
child 22243 91944eab7b92
equal deleted inserted replaced
21726:3533814ab107 21727:4a5fc611c9a7
  1001                                compiler, comp_level);
  1001                                compiler, comp_level);
  1002 
  1002 
  1003     // Free codeBlobs
  1003     // Free codeBlobs
  1004     code_buffer->free_blob();
  1004     code_buffer->free_blob();
  1005 
  1005 
  1006     if (nm == NULL) {
  1006     if (nm != NULL) {
  1007       // The CodeCache is full.  Print out warning and disable compilation.
       
  1008       record_failure("code cache is full");
       
  1009       {
       
  1010         MutexUnlocker ml(Compile_lock);
       
  1011         MutexUnlocker locker(MethodCompileQueue_lock);
       
  1012         CompileBroker::handle_full_code_cache();
       
  1013       }
       
  1014     } else {
       
  1015       nm->set_has_unsafe_access(has_unsafe_access);
  1007       nm->set_has_unsafe_access(has_unsafe_access);
  1016       nm->set_has_wide_vectors(has_wide_vectors);
  1008       nm->set_has_wide_vectors(has_wide_vectors);
  1017 
  1009 
  1018       // Record successful registration.
  1010       // Record successful registration.
  1019       // (Put nm into the task handle *before* publishing to the Java heap.)
  1011       // (Put nm into the task handle *before* publishing to the Java heap.)
  1020       if (task() != NULL)  task()->set_code(nm);
  1012       if (task() != NULL) {
       
  1013         task()->set_code(nm);
       
  1014       }
  1021 
  1015 
  1022       if (entry_bci == InvocationEntryBci) {
  1016       if (entry_bci == InvocationEntryBci) {
  1023         if (TieredCompilation) {
  1017         if (TieredCompilation) {
  1024           // If there is an old version we're done with it
  1018           // If there is an old version we're done with it
  1025           nmethod* old = method->code();
  1019           nmethod* old = method->code();
  1053                         entry_bci);
  1047                         entry_bci);
  1054         }
  1048         }
  1055         method->method_holder()->add_osr_nmethod(nm);
  1049         method->method_holder()->add_osr_nmethod(nm);
  1056       }
  1050       }
  1057     }
  1051     }
  1058   }
  1052   }  // safepoints are allowed again
  1059   // JVMTI -- compiled method notification (must be done outside lock)
  1053 
  1060   if (nm != NULL) {
  1054   if (nm != NULL) {
       
  1055     // JVMTI -- compiled method notification (must be done outside lock)
  1061     nm->post_compiled_method_load_event();
  1056     nm->post_compiled_method_load_event();
  1062   }
  1057   } else {
  1063 
  1058     // The CodeCache is full. Print out warning and disable compilation.
       
  1059     record_failure("code cache is full");
       
  1060     CompileBroker::handle_full_code_cache();
       
  1061   }
  1064 }
  1062 }
  1065 
  1063 
  1066 
  1064 
  1067 // ------------------------------------------------------------------
  1065 // ------------------------------------------------------------------
  1068 // ciEnv::find_system_klass
  1066 // ciEnv::find_system_klass