src/share/vm/ci/ciEnv.cpp

changeset 6096
e2509677809c
parent 5971
b8860472c377
child 6114
938e1e64e28f
     1.1 --- a/src/share/vm/ci/ciEnv.cpp	Wed Nov 06 06:51:24 2013 -0800
     1.2 +++ b/src/share/vm/ci/ciEnv.cpp	Fri Nov 08 01:13:11 2013 -0800
     1.3 @@ -935,7 +935,9 @@
     1.4  
     1.5      // Prevent SystemDictionary::add_to_hierarchy from running
     1.6      // and invalidating our dependencies until we install this method.
     1.7 +    // No safepoints are allowed. Otherwise, class redefinition can occur in between.
     1.8      MutexLocker ml(Compile_lock);
     1.9 +    No_Safepoint_Verifier nsv;
    1.10  
    1.11      // Change in Jvmti state may invalidate compilation.
    1.12      if (!failing() &&
    1.13 @@ -1001,16 +1003,6 @@
    1.14      // Free codeBlobs
    1.15      code_buffer->free_blob();
    1.16  
    1.17 -    // stress test 6243940 by immediately making the method
    1.18 -    // non-entrant behind the system's back. This has serious
    1.19 -    // side effects on the code cache and is not meant for
    1.20 -    // general stress testing
    1.21 -    if (nm != NULL && StressNonEntrant) {
    1.22 -      MutexLockerEx pl(Patching_lock, Mutex::_no_safepoint_check_flag);
    1.23 -      NativeJump::patch_verified_entry(nm->entry_point(), nm->verified_entry_point(),
    1.24 -                  SharedRuntime::get_handle_wrong_method_stub());
    1.25 -    }
    1.26 -
    1.27      if (nm == NULL) {
    1.28        // The CodeCache is full.  Print out warning and disable compilation.
    1.29        record_failure("code cache is full");
    1.30 @@ -1036,11 +1028,11 @@
    1.31              char *method_name = method->name_and_sig_as_C_string();
    1.32              tty->print_cr("Replacing method %s", method_name);
    1.33            }
    1.34 -          if (old != NULL ) {
    1.35 +          if (old != NULL) {
    1.36              old->make_not_entrant();
    1.37            }
    1.38          }
    1.39 -        if (TraceNMethodInstalls ) {
    1.40 +        if (TraceNMethodInstalls) {
    1.41            ResourceMark rm;
    1.42            char *method_name = method->name_and_sig_as_C_string();
    1.43            ttyLocker ttyl;
    1.44 @@ -1051,7 +1043,7 @@
    1.45          // Allow the code to be executed
    1.46          method->set_code(method, nm);
    1.47        } else {
    1.48 -        if (TraceNMethodInstalls ) {
    1.49 +        if (TraceNMethodInstalls) {
    1.50            ResourceMark rm;
    1.51            char *method_name = method->name_and_sig_as_C_string();
    1.52            ttyLocker ttyl;
    1.53 @@ -1061,7 +1053,6 @@
    1.54                          entry_bci);
    1.55          }
    1.56          method->method_holder()->add_osr_nmethod(nm);
    1.57 -
    1.58        }
    1.59      }
    1.60    }

mercurial