< prev index next >

src/hotspot/share/code/codeCache.cpp

Print this page




 763     ExceptionCache* next = curr->purge_list_next();
 764     delete curr;
 765     curr = next;
 766   }
 767   _exception_cache_purge_list = NULL;
 768 }
 769 
 770 uint8_t CodeCache::_unloading_cycle = 1;
 771 
 772 void CodeCache::increment_unloading_cycle() {
 773   if (_unloading_cycle == 1) {
 774     _unloading_cycle = 2;
 775   } else {
 776     _unloading_cycle = 1;
 777   }
 778 }
 779 
 780 CodeCache::UnloadingScope::UnloadingScope(BoolObjectClosure* is_alive)
 781   : _is_unloading_behaviour(is_alive)
 782 {
 783   _saved_behaviour = IsUnloadingBehaviour::current();
 784   IsUnloadingBehaviour::set_current(&_is_unloading_behaviour);
 785   increment_unloading_cycle();
 786   DependencyContext::cleaning_start();
 787 }
 788 
 789 CodeCache::UnloadingScope::~UnloadingScope() {
 790   IsUnloadingBehaviour::set_current(_saved_behaviour);
 791   DependencyContext::cleaning_end();
 792 }
 793 
 794 void CodeCache::verify_oops() {
 795   MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
 796   VerifyOopClosure voc;
 797   NMethodIterator iter(NMethodIterator::only_alive_and_not_unloading);
 798   while(iter.next()) {
 799     nmethod* nm = iter.method();
 800     nm->oops_do(&voc);
 801     nm->verify_oop_relocations();
 802   }
 803 }
 804 
 805 int CodeCache::blob_count(int code_blob_type) {
 806   CodeHeap* heap = get_code_heap(code_blob_type);
 807   return (heap != NULL) ? heap->blob_count() : 0;
 808 }
 809 
 810 int CodeCache::blob_count() {




 763     ExceptionCache* next = curr->purge_list_next();
 764     delete curr;
 765     curr = next;
 766   }
 767   _exception_cache_purge_list = NULL;
 768 }
 769 
 770 uint8_t CodeCache::_unloading_cycle = 1;
 771 
 772 void CodeCache::increment_unloading_cycle() {
 773   if (_unloading_cycle == 1) {
 774     _unloading_cycle = 2;
 775   } else {
 776     _unloading_cycle = 1;
 777   }
 778 }
 779 
 780 CodeCache::UnloadingScope::UnloadingScope(BoolObjectClosure* is_alive)
 781   : _is_unloading_behaviour(is_alive)
 782 {

 783   IsUnloadingBehaviour::set_current(&_is_unloading_behaviour);
 784   increment_unloading_cycle();
 785   DependencyContext::cleaning_start();
 786 }
 787 
 788 CodeCache::UnloadingScope::~UnloadingScope() {
 789   IsUnloadingBehaviour::set_current(NULL);
 790   DependencyContext::cleaning_end();
 791 }
 792 
 793 void CodeCache::verify_oops() {
 794   MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
 795   VerifyOopClosure voc;
 796   NMethodIterator iter(NMethodIterator::only_alive_and_not_unloading);
 797   while(iter.next()) {
 798     nmethod* nm = iter.method();
 799     nm->oops_do(&voc);
 800     nm->verify_oop_relocations();
 801   }
 802 }
 803 
 804 int CodeCache::blob_count(int code_blob_type) {
 805   CodeHeap* heap = get_code_heap(code_blob_type);
 806   return (heap != NULL) ? heap->blob_count() : 0;
 807 }
 808 
 809 int CodeCache::blob_count() {


< prev index next >