src/share/vm/code/codeCache.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File JDK-8034839 Sdiff src/share/vm/code

src/share/vm/code/codeCache.cpp

Print this page




 578 }
 579 
 580 
 581 void codeCache_init() {
 582   CodeCache::initialize();
 583 }
 584 
 585 //------------------------------------------------------------------------------------------------
 586 
 587 int CodeCache::number_of_nmethods_with_dependencies() {
 588   return _number_of_nmethods_with_dependencies;
 589 }
 590 
 591 void CodeCache::clear_inline_caches() {
 592   assert_locked_or_safepoint(CodeCache_lock);
 593   FOR_ALL_ALIVE_NMETHODS(nm) {
 594     nm->clear_inline_caches();
 595   }
 596 }
 597 
 598 #ifndef PRODUCT
 599 // Keeps track of time spent for checking dependencies
 600 static elapsedTimer dependentCheckTime;
 601 #endif
 602 
 603 
 604 int CodeCache::mark_for_deoptimization(DepChange& changes) {
 605   MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
 606   int number_of_marked_CodeBlobs = 0;
 607 
 608   // search the hierarchy looking for nmethods which are affected by the loading of this class
 609 
 610   // then search the interfaces this class implements looking for nmethods
 611   // which might be dependent of the fact that an interface only had one
 612   // implementor.
 613   // nmethod::check_all_dependencies works only correctly, if no safepoint
 614   // can happen
 615   No_Safepoint_Verifier nsv;
 616   for (DepChange::ContextStream str(changes, nsv); str.next(); ) {
 617     Klass* d = str.klass();
 618     number_of_marked_CodeBlobs += InstanceKlass::cast(d)->mark_dependent_nmethods(changes);
 619   }
 620 
 621 #ifndef PRODUCT
 622   if (VerifyDependencies) {




 578 }
 579 
 580 
 581 void codeCache_init() {
 582   CodeCache::initialize();
 583 }
 584 
 585 //------------------------------------------------------------------------------------------------
 586 
 587 int CodeCache::number_of_nmethods_with_dependencies() {
 588   return _number_of_nmethods_with_dependencies;
 589 }
 590 
 591 void CodeCache::clear_inline_caches() {
 592   assert_locked_or_safepoint(CodeCache_lock);
 593   FOR_ALL_ALIVE_NMETHODS(nm) {
 594     nm->clear_inline_caches();
 595   }
 596 }
 597 

 598 // Keeps track of time spent for checking dependencies
 599 NOT_PRODUCT(static elapsedTimer dependentCheckTime;)


 600 
 601 int CodeCache::mark_for_deoptimization(DepChange& changes) {
 602   MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
 603   int number_of_marked_CodeBlobs = 0;
 604 
 605   // search the hierarchy looking for nmethods which are affected by the loading of this class
 606 
 607   // then search the interfaces this class implements looking for nmethods
 608   // which might be dependent of the fact that an interface only had one
 609   // implementor.
 610   // nmethod::check_all_dependencies works only correctly, if no safepoint
 611   // can happen
 612   No_Safepoint_Verifier nsv;
 613   for (DepChange::ContextStream str(changes, nsv); str.next(); ) {
 614     Klass* d = str.klass();
 615     number_of_marked_CodeBlobs += InstanceKlass::cast(d)->mark_dependent_nmethods(changes);
 616   }
 617 
 618 #ifndef PRODUCT
 619   if (VerifyDependencies) {


src/share/vm/code/codeCache.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File