< prev index next >

src/hotspot/share/code/codeCache.cpp

 #include "code/codeBlob.hpp"
 #include "code/codeCache.hpp"
 #include "code/codeHeapState.hpp"
 #include "code/compiledIC.hpp"
 #include "code/dependencies.hpp"
+#include "code/dependencyContext.hpp"
 #include "code/icBuffer.hpp"
 #include "code/nmethod.hpp"
 #include "code/pcDesc.hpp"
 #include "compiler/compileBroker.hpp"
 #include "jfr/jfrEvents.hpp"

@@ -938,10 +939,23 } else { _unloading_cycle = 1; } } +CodeCache::UnloadingScope::UnloadingScope(BoolObjectClosure* is_alive) + : _is_unloading_behaviour(is_alive) +{ + IsUnloadingBehaviour::set_current(&_is_unloading_behaviour); + increment_unloading_cycle(); + DependencyContext::cleaning_start(); +} + +CodeCache::UnloadingScope::~UnloadingScope() { + IsUnloadingBehaviour::set_current(NULL); + DependencyContext::cleaning_end(); +} + void CodeCache::verify_oops() { MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); VerifyOopClosure voc; NMethodIterator iter(NMethodIterator::only_alive_and_not_unloading); while(iter.next()) {
< prev index next >