src/share/vm/ci/ciEnv.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File JDK-8015774 Sdiff src/share/vm/ci

src/share/vm/ci/ciEnv.cpp

Print this page




1001 
1002     // Free codeBlobs
1003     code_buffer->free_blob();
1004 
1005     // stress test 6243940 by immediately making the method
1006     // non-entrant behind the system's back. This has serious
1007     // side effects on the code cache and is not meant for
1008     // general stress testing
1009     if (nm != NULL && StressNonEntrant) {
1010       MutexLockerEx pl(Patching_lock, Mutex::_no_safepoint_check_flag);
1011       NativeJump::patch_verified_entry(nm->entry_point(), nm->verified_entry_point(),
1012                   SharedRuntime::get_handle_wrong_method_stub());
1013     }
1014 
1015     if (nm == NULL) {
1016       // The CodeCache is full.  Print out warning and disable compilation.
1017       record_failure("code cache is full");
1018       {
1019         MutexUnlocker ml(Compile_lock);
1020         MutexUnlocker locker(MethodCompileQueue_lock);
1021         CompileBroker::handle_full_code_cache();
1022       }
1023     } else {
1024       nm->set_has_unsafe_access(has_unsafe_access);
1025       nm->set_has_wide_vectors(has_wide_vectors);
1026 
1027       // Record successful registration.
1028       // (Put nm into the task handle *before* publishing to the Java heap.)
1029       if (task() != NULL)  task()->set_code(nm);
1030 
1031       if (entry_bci == InvocationEntryBci) {
1032         if (TieredCompilation) {
1033           // If there is an old version we're done with it
1034           nmethod* old = method->code();
1035           if (TraceMethodReplacement && old != NULL) {
1036             ResourceMark rm;
1037             char *method_name = method->name_and_sig_as_C_string();
1038             tty->print_cr("Replacing method %s", method_name);
1039           }
1040           if (old != NULL ) {
1041             old->make_not_entrant();




1001 
1002     // Free codeBlobs
1003     code_buffer->free_blob();
1004 
1005     // stress test 6243940 by immediately making the method
1006     // non-entrant behind the system's back. This has serious
1007     // side effects on the code cache and is not meant for
1008     // general stress testing
1009     if (nm != NULL && StressNonEntrant) {
1010       MutexLockerEx pl(Patching_lock, Mutex::_no_safepoint_check_flag);
1011       NativeJump::patch_verified_entry(nm->entry_point(), nm->verified_entry_point(),
1012                   SharedRuntime::get_handle_wrong_method_stub());
1013     }
1014 
1015     if (nm == NULL) {
1016       // The CodeCache is full. Print out warning and disable compilation.
1017       record_failure("code cache is full");
1018       {
1019         MutexUnlocker ml(Compile_lock);
1020         MutexUnlocker locker(MethodCompileQueue_lock);
1021         CompileBroker::handle_full_code_cache(CodeCache::get_code_blob_type(comp_level));
1022       }
1023     } else {
1024       nm->set_has_unsafe_access(has_unsafe_access);
1025       nm->set_has_wide_vectors(has_wide_vectors);
1026 
1027       // Record successful registration.
1028       // (Put nm into the task handle *before* publishing to the Java heap.)
1029       if (task() != NULL)  task()->set_code(nm);
1030 
1031       if (entry_bci == InvocationEntryBci) {
1032         if (TieredCompilation) {
1033           // If there is an old version we're done with it
1034           nmethod* old = method->code();
1035           if (TraceMethodReplacement && old != NULL) {
1036             ResourceMark rm;
1037             char *method_name = method->name_and_sig_as_C_string();
1038             tty->print_cr("Replacing method %s", method_name);
1039           }
1040           if (old != NULL ) {
1041             old->make_not_entrant();


src/share/vm/ci/ciEnv.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File