src/hotspot/share/code/codeCache.cpp
changeset 52781 436097b038a1
parent 52661 4f45c682eab0
child 52815 10bb941d7fd4
equal deleted inserted replaced
52780:be588be89f68 52781:436097b038a1
    27 #include "code/codeBlob.hpp"
    27 #include "code/codeBlob.hpp"
    28 #include "code/codeCache.hpp"
    28 #include "code/codeCache.hpp"
    29 #include "code/codeHeapState.hpp"
    29 #include "code/codeHeapState.hpp"
    30 #include "code/compiledIC.hpp"
    30 #include "code/compiledIC.hpp"
    31 #include "code/dependencies.hpp"
    31 #include "code/dependencies.hpp"
       
    32 #include "code/dependencyContext.hpp"
    32 #include "code/icBuffer.hpp"
    33 #include "code/icBuffer.hpp"
    33 #include "code/nmethod.hpp"
    34 #include "code/nmethod.hpp"
    34 #include "code/pcDesc.hpp"
    35 #include "code/pcDesc.hpp"
    35 #include "compiler/compileBroker.hpp"
    36 #include "compiler/compileBroker.hpp"
    36 #include "jfr/jfrEvents.hpp"
    37 #include "jfr/jfrEvents.hpp"
   938   } else {
   939   } else {
   939     _unloading_cycle = 1;
   940     _unloading_cycle = 1;
   940   }
   941   }
   941 }
   942 }
   942 
   943 
       
   944 CodeCache::UnloadingScope::UnloadingScope(BoolObjectClosure* is_alive)
       
   945   : _is_unloading_behaviour(is_alive)
       
   946 {
       
   947   IsUnloadingBehaviour::set_current(&_is_unloading_behaviour);
       
   948   increment_unloading_cycle();
       
   949   DependencyContext::cleaning_start();
       
   950 }
       
   951 
       
   952 CodeCache::UnloadingScope::~UnloadingScope() {
       
   953   IsUnloadingBehaviour::set_current(NULL);
       
   954   DependencyContext::cleaning_end();
       
   955 }
       
   956 
   943 void CodeCache::verify_oops() {
   957 void CodeCache::verify_oops() {
   944   MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
   958   MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
   945   VerifyOopClosure voc;
   959   VerifyOopClosure voc;
   946   NMethodIterator iter(NMethodIterator::only_alive_and_not_unloading);
   960   NMethodIterator iter(NMethodIterator::only_alive_and_not_unloading);
   947   while(iter.next()) {
   961   while(iter.next()) {