src/hotspot/share/gc/z/zRootsIterator.cpp
changeset 57659 d349685a98ae
parent 57658 0022b39ae5ae
child 57828 35db8fba55f9
equal deleted inserted replaced
57658:0022b39ae5ae 57659:d349685a98ae
   408   _vm_weak_handles.oops_do(cl);
   408   _vm_weak_handles.oops_do(cl);
   409   _jni_weak_handles.oops_do(cl);
   409   _jni_weak_handles.oops_do(cl);
   410   _string_table.oops_do(cl);
   410   _string_table.oops_do(cl);
   411   _resolved_method_table.oops_do(cl);
   411   _resolved_method_table.oops_do(cl);
   412 }
   412 }
   413 
       
   414 ZThreadRootsIterator::ZThreadRootsIterator() :
       
   415     _threads(this) {
       
   416   assert(SafepointSynchronize::is_at_safepoint(), "Should be at safepoint");
       
   417   ZStatTimer timer(ZSubPhasePauseRootsSetup);
       
   418   Threads::change_thread_claim_token();
       
   419 }
       
   420 
       
   421 ZThreadRootsIterator::~ZThreadRootsIterator() {
       
   422   ZStatTimer timer(ZSubPhasePauseRootsTeardown);
       
   423   Threads::assert_all_threads_claimed();
       
   424 }
       
   425 
       
   426 void ZThreadRootsIterator::do_threads(ZRootsIteratorClosure* cl) {
       
   427   ZStatTimer timer(ZSubPhasePauseRootsThreads);
       
   428   ResourceMark rm;
       
   429   Threads::possibly_parallel_oops_do(true, cl, NULL);
       
   430 }
       
   431 
       
   432 void ZThreadRootsIterator::oops_do(ZRootsIteratorClosure* cl) {
       
   433   ZStatTimer timer(ZSubPhasePauseRoots);
       
   434   _threads.oops_do(cl);
       
   435 }