< prev index next >

src/hotspot/share/code/compiledMethod.cpp


538 
539   // Exception cache only needs to be called if unloading occurred                                                                   
540   if (unloading_occurred) {                                                                                                          
541     clean_exception_cache();                                                                                                         
542   }                                                                                                                                  
543 
544   if (!cleanup_inline_caches_impl(unloading_occurred, false)) {                                                                      
545     return false;                                                                                                                    
546   }                                                                                                                                  
547 
548   // All static stubs need to be cleaned.                                                                                            
549   clean_ic_stubs();                                                                                                                  
550 
551   // Check that the metadata embedded in the nmethod is alive                                                                        
552   DEBUG_ONLY(metadata_do(check_class));                                                                                              
553   return true;                                                                                                                       
554 }                                                                                                                                    
555 
556 void CompiledMethod::cleanup_inline_caches(bool clean_all) {                                                                         
557   for (;;) {                                                                                                                         
558     DEBUG_ONLY(ICRefillVerifier ic_refill_verifier;)                                                                                 
559     { CompiledICLocker ic_locker(this);                                                                                              
560       if (cleanup_inline_caches_impl(false, clean_all)) {                                                                            
561         return;                                                                                                                      
562       }                                                                                                                              
563     }                                                                                                                                
564     InlineCacheBuffer::refill_ic_stubs();                                                                                            
565   }                                                                                                                                  
566 }                                                                                                                                    
567 
568 // Called to clean up after class unloading for live nmethods and from the sweeper                                                   
569 // for all methods.                                                                                                                  
570 bool CompiledMethod::cleanup_inline_caches_impl(bool unloading_occurred, bool clean_all) {                                           
571   assert(CompiledICLocker::is_safe(this), "mt unsafe call");                                                                         
572   ResourceMark rm;                                                                                                                   
573 
574   // Find all calls in an nmethod and clear the ones that point to non-entrant,                                                      
575   // zombie and unloaded nmethods.                                                                                                   
576   RelocIterator iter(this, oops_reloc_begin());                                                                                      
577   while(iter.next()) {                                                                                                               

538 
539   // Exception cache only needs to be called if unloading occurred
540   if (unloading_occurred) {
541     clean_exception_cache();
542   }
543 
544   if (!cleanup_inline_caches_impl(unloading_occurred, false)) {
545     return false;
546   }
547 
548   // All static stubs need to be cleaned.
549   clean_ic_stubs();
550 
551   // Check that the metadata embedded in the nmethod is alive
552   DEBUG_ONLY(metadata_do(check_class));
553   return true;
554 }
555 
556 void CompiledMethod::cleanup_inline_caches(bool clean_all) {
557   for (;;) {
558     ICRefillVerifier ic_refill_verifier;
559     { CompiledICLocker ic_locker(this);
560       if (cleanup_inline_caches_impl(false, clean_all)) {
561         return;
562       }
563     }
564     InlineCacheBuffer::refill_ic_stubs();
565   }
566 }
567 
568 // Called to clean up after class unloading for live nmethods and from the sweeper
569 // for all methods.
570 bool CompiledMethod::cleanup_inline_caches_impl(bool unloading_occurred, bool clean_all) {
571   assert(CompiledICLocker::is_safe(this), "mt unsafe call");
572   ResourceMark rm;
573 
574   // Find all calls in an nmethod and clear the ones that point to non-entrant,
575   // zombie and unloaded nmethods.
576   RelocIterator iter(this, oops_reloc_begin());
577   while(iter.next()) {
< prev index next >