< prev index next >

src/hotspot/share/gc/z/zRootsIterator.cpp

concurrent root iterator v3

*** 141,151 **** _threads(this), _code_cache(this) { assert(SafepointSynchronize::is_at_safepoint(), "Should be at safepoint"); ZStatTimer timer(ZSubPhasePauseRootsSetup); Threads::change_thread_claim_parity(); - ClassLoaderDataGraph::clear_claimed_marks(); COMPILER2_PRESENT(DerivedPointerTable::clear()); CodeCache::gc_prologue(); ZNMethodTable::gc_prologue(); } --- 141,150 ---- ***************
*** 238,251 **** --- 237,253 ---- ZConcurrentRootsIterator::ZConcurrentRootsIterator() : _jni_handles_iter(JNIHandles::global_handles()), _jni_handles(this), _class_loader_data_graph(this) { ZStatTimer timer(ZSubPhaseConcurrentRootsSetup); + ClassLoaderDataGraph_lock->lock(); + ClassLoaderDataGraph::clear_claimed_marks(); } ZConcurrentRootsIterator::~ZConcurrentRootsIterator() { ZStatTimer timer(ZSubPhaseConcurrentRootsTeardown); + ClassLoaderDataGraph_lock->unlock(); } void ZConcurrentRootsIterator::do_jni_handles(OopClosure* cl) { ZStatTimer timer(ZSubPhaseConcurrentRootsJNIHandles); _jni_handles_iter.oops_do(cl);
< prev index next >