src/share/vm/runtime/sweeper.cpp

changeset 1970
ff38d05ea86f
parent 1907
c18cbe5936b8
child 1999
2a47bd84841f
     1.1 --- a/src/share/vm/runtime/sweeper.cpp	Tue Jun 15 18:07:27 2010 -0700
     1.2 +++ b/src/share/vm/runtime/sweeper.cpp	Fri Jun 18 16:51:54 2010 -0700
     1.3 @@ -26,7 +26,7 @@
     1.4  # include "incls/_sweeper.cpp.incl"
     1.5  
     1.6  long      NMethodSweeper::_traversals = 0;   // No. of stack traversals performed
     1.7 -CodeBlob* NMethodSweeper::_current = NULL;   // Current nmethod
     1.8 +nmethod*  NMethodSweeper::_current = NULL;   // Current nmethod
     1.9  int       NMethodSweeper::_seen = 0 ;        // No. of blobs we have currently processed in current pass of CodeCache
    1.10  int       NMethodSweeper::_invocations = 0;  // No. of invocations left until we are completed with this pass
    1.11  
    1.12 @@ -171,20 +171,16 @@
    1.13        // Since we will give up the CodeCache_lock, always skip ahead to an nmethod.
    1.14        // Other blobs can be deleted by other threads
    1.15        // Read next before we potentially delete current
    1.16 -      CodeBlob* next = CodeCache::next_nmethod(_current);
    1.17 +      nmethod* next = CodeCache::next_nmethod(_current);
    1.18  
    1.19        // Now ready to process nmethod and give up CodeCache_lock
    1.20        {
    1.21          MutexUnlockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
    1.22 -        process_nmethod((nmethod *)_current);
    1.23 +        process_nmethod(_current);
    1.24        }
    1.25        _seen++;
    1.26        _current = next;
    1.27      }
    1.28 -
    1.29 -    // Skip forward to the next nmethod (if any). Code blobs other than nmethods
    1.30 -    // can be freed async to us and make _current invalid while we sleep.
    1.31 -    _current = CodeCache::next_nmethod(_current);
    1.32    }
    1.33  
    1.34    if (_current == NULL && !_rescan && (_locked_seen || _not_entrant_seen_on_stack)) {

mercurial