changeset 1564:ff38d05ea86f

6956958: assert(is_clean() || is_call_to_compiled() || is_call_to_interpreted() || is_optimized() || is_megam Reviewed-by: kvn
author never
date Fri, 18 Jun 2010 16:51:54 -0700
parents 4311f23817fd
children 38e8278318ca
files src/share/vm/runtime/sweeper.cpp src/share/vm/runtime/sweeper.hpp
diffstat 2 files changed, 4 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/runtime/sweeper.cpp	Tue Jun 15 18:07:27 2010 -0700
+++ b/src/share/vm/runtime/sweeper.cpp	Fri Jun 18 16:51:54 2010 -0700
@@ -26,7 +26,7 @@
 # include "incls/_sweeper.cpp.incl"
 
 long      NMethodSweeper::_traversals = 0;   // No. of stack traversals performed
-CodeBlob* NMethodSweeper::_current = NULL;   // Current nmethod
+nmethod*  NMethodSweeper::_current = NULL;   // Current nmethod
 int       NMethodSweeper::_seen = 0 ;        // No. of blobs we have currently processed in current pass of CodeCache
 int       NMethodSweeper::_invocations = 0;  // No. of invocations left until we are completed with this pass
 
@@ -171,20 +171,16 @@
       // Since we will give up the CodeCache_lock, always skip ahead to an nmethod.
       // Other blobs can be deleted by other threads
       // Read next before we potentially delete current
-      CodeBlob* next = CodeCache::next_nmethod(_current);
+      nmethod* next = CodeCache::next_nmethod(_current);
 
       // Now ready to process nmethod and give up CodeCache_lock
       {
         MutexUnlockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
-        process_nmethod((nmethod *)_current);
+        process_nmethod(_current);
       }
       _seen++;
       _current = next;
     }
-
-    // Skip forward to the next nmethod (if any). Code blobs other than nmethods
-    // can be freed async to us and make _current invalid while we sleep.
-    _current = CodeCache::next_nmethod(_current);
   }
 
   if (_current == NULL && !_rescan && (_locked_seen || _not_entrant_seen_on_stack)) {
--- a/src/share/vm/runtime/sweeper.hpp	Tue Jun 15 18:07:27 2010 -0700
+++ b/src/share/vm/runtime/sweeper.hpp	Fri Jun 18 16:51:54 2010 -0700
@@ -29,7 +29,7 @@
 
 class NMethodSweeper : public AllStatic {
   static long      _traversals;   // Stack traversal count
-  static CodeBlob* _current;      // Current nmethod
+  static nmethod*  _current;      // Current nmethod
   static int       _seen;         // Nof. nmethod we have currently processed in current pass of CodeCache
   static int       _invocations;  // No. of invocations left until we are completed with this pass