< prev index next >

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

CLD claiming v2

237     _jni_handles_iter(JNIHandles::global_handles()),                                                                                 
238     _jni_handles(this),                                                                                                              
239     _class_loader_data_graph(this) {                                                                                                 
240   ZStatTimer timer(ZSubPhaseConcurrentRootsSetup);                                                                                   
241   ClassLoaderDataGraph_lock->lock();                                                                                                 
242   ClassLoaderDataGraph::clear_claimed_marks();                                                                                       
243 }                                                                                                                                    
244 
245 ZConcurrentRootsIterator::~ZConcurrentRootsIterator() {                                                                              
246   ZStatTimer timer(ZSubPhaseConcurrentRootsTeardown);                                                                                
247   ClassLoaderDataGraph_lock->unlock();                                                                                               
248 }                                                                                                                                    
249 
250 void ZConcurrentRootsIterator::do_jni_handles(OopClosure* cl) {                                                                      
251   ZStatTimer timer(ZSubPhaseConcurrentRootsJNIHandles);                                                                              
252   _jni_handles_iter.oops_do(cl);                                                                                                     
253 }                                                                                                                                    
254 
255 void ZConcurrentRootsIterator::do_class_loader_data_graph(OopClosure* cl) {                                                          
256   ZStatTimer timer(ZSubPhaseConcurrentRootsClassLoaderDataGraph);                                                                    
257   CLDToOopClosure cld_cl(cl, ClassLoaderData::_claim_value_strong);                                                                  
258   ClassLoaderDataGraph::cld_do(&cld_cl);                                                                                             
259 }                                                                                                                                    
260 
261 void ZConcurrentRootsIterator::oops_do(OopClosure* cl) {                                                                             
262   ZStatTimer timer(ZSubPhaseConcurrentRoots);                                                                                        
263   _jni_handles.oops_do(cl);                                                                                                          
264   _class_loader_data_graph.oops_do(cl);                                                                                              
265 }                                                                                                                                    
266 
267 ZWeakRootsIterator::ZWeakRootsIterator() :                                                                                           
268     _jvmti_weak_export(this),                                                                                                        
269     _jfr_weak(this) {                                                                                                                
270   assert(SafepointSynchronize::is_at_safepoint(), "Should be at safepoint");                                                         
271   ZStatTimer timer(ZSubPhasePauseWeakRootsSetup);                                                                                    
272   StringTable::reset_dead_counter();                                                                                                 
273 }                                                                                                                                    
274 
275 ZWeakRootsIterator::~ZWeakRootsIterator() {                                                                                          
276   ZStatTimer timer(ZSubPhasePauseWeakRootsTeardown);                                                                                 

237     _jni_handles_iter(JNIHandles::global_handles()),
238     _jni_handles(this),
239     _class_loader_data_graph(this) {
240   ZStatTimer timer(ZSubPhaseConcurrentRootsSetup);
241   ClassLoaderDataGraph_lock->lock();
242   ClassLoaderDataGraph::clear_claimed_marks();
243 }
244 
245 ZConcurrentRootsIterator::~ZConcurrentRootsIterator() {
246   ZStatTimer timer(ZSubPhaseConcurrentRootsTeardown);
247   ClassLoaderDataGraph_lock->unlock();
248 }
249 
250 void ZConcurrentRootsIterator::do_jni_handles(OopClosure* cl) {
251   ZStatTimer timer(ZSubPhaseConcurrentRootsJNIHandles);
252   _jni_handles_iter.oops_do(cl);
253 }
254 
255 void ZConcurrentRootsIterator::do_class_loader_data_graph(OopClosure* cl) {
256   ZStatTimer timer(ZSubPhaseConcurrentRootsClassLoaderDataGraph);
257   CLDToOopClosure cld_cl(cl, ClassLoaderData::_claim_strong);
258   ClassLoaderDataGraph::cld_do(&cld_cl);
259 }
260 
261 void ZConcurrentRootsIterator::oops_do(OopClosure* cl) {
262   ZStatTimer timer(ZSubPhaseConcurrentRoots);
263   _jni_handles.oops_do(cl);
264   _class_loader_data_graph.oops_do(cl);
265 }
266 
267 ZWeakRootsIterator::ZWeakRootsIterator() :
268     _jvmti_weak_export(this),
269     _jfr_weak(this) {
270   assert(SafepointSynchronize::is_at_safepoint(), "Should be at safepoint");
271   ZStatTimer timer(ZSubPhasePauseWeakRootsSetup);
272   StringTable::reset_dead_counter();
273 }
274 
275 ZWeakRootsIterator::~ZWeakRootsIterator() {
276   ZStatTimer timer(ZSubPhasePauseWeakRootsTeardown);
< prev index next >