src/share/vm/prims/jvmtiCodeBlobEvents.cpp

changeset 2004
a528509c992b
parent 1988
65b0c03b165d
child 2103
3e8fbc61cee8
     1.1 --- a/src/share/vm/prims/jvmtiCodeBlobEvents.cpp	Wed Jul 14 14:47:34 2010 -0700
     1.2 +++ b/src/share/vm/prims/jvmtiCodeBlobEvents.cpp	Thu Jul 15 08:54:48 2010 -0700
     1.3 @@ -118,7 +118,6 @@
     1.4    for (int i=0; i<_global_code_blobs->length(); i++) {
     1.5      JvmtiCodeBlobDesc* scb = _global_code_blobs->at(i);
     1.6      if (addr == scb->code_begin()) {
     1.7 -      ShouldNotReachHere();
     1.8        return;
     1.9      }
    1.10    }
    1.11 @@ -206,11 +205,11 @@
    1.12    MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
    1.13    nmethod* current = CodeCache::first_nmethod();
    1.14    while (current != NULL) {
    1.15 -    // Lock the nmethod so it can't be freed
    1.16 -    nmethodLocker nml(current);
    1.17 -
    1.18      // Only notify for live nmethods
    1.19      if (current->is_alive()) {
    1.20 +      // Lock the nmethod so it can't be freed
    1.21 +      nmethodLocker nml(current);
    1.22 +
    1.23        // Don't hold the lock over the notify or jmethodID creation
    1.24        MutexUnlockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
    1.25        current->get_and_cache_jmethod_id();

mercurial