src/hotspot/share/gc/z/zHeapIterator.cpp
changeset 57658 0022b39ae5ae
parent 55603 3868dde58ebb
child 57851 6728c41f2a08
equal deleted inserted replaced
57657:22e12dd8f21a 57658:0022b39ae5ae
   186 void ZHeapIterator::push_fields(oop obj) {
   186 void ZHeapIterator::push_fields(oop obj) {
   187   ZHeapIteratorOopClosure<VisitReferents> cl(this, obj);
   187   ZHeapIteratorOopClosure<VisitReferents> cl(this, obj);
   188   obj->oop_iterate(&cl);
   188   obj->oop_iterate(&cl);
   189 }
   189 }
   190 
   190 
   191 class ZHeapIterateConcurrentRootsIterator : public ZConcurrentRootsIterator {
       
   192 public:
       
   193   ZHeapIterateConcurrentRootsIterator() :
       
   194       ZConcurrentRootsIterator(ClassLoaderData::_claim_other) {}
       
   195 };
       
   196 
       
   197 template <bool VisitWeaks>
   191 template <bool VisitWeaks>
   198 void ZHeapIterator::objects_do(ObjectClosure* cl) {
   192 void ZHeapIterator::objects_do(ObjectClosure* cl) {
   199   ZStatTimerDisable disable;
   193   ZStatTimerDisable disable;
   200 
   194 
   201   // Push roots to visit
   195   // Push roots to visit
   202   push_roots<ZRootsIterator,                      false /* Concurrent */, false /* Weak */>();
   196   push_roots<ZRootsIterator,                     false /* Concurrent */, false /* Weak */>();
   203   push_roots<ZHeapIterateConcurrentRootsIterator, true  /* Concurrent */, false /* Weak */>();
   197   push_roots<ZConcurrentRootsIteratorClaimOther, true  /* Concurrent */, false /* Weak */>();
   204   if (VisitWeaks) {
   198   if (VisitWeaks) {
   205     push_roots<ZWeakRootsIterator,           false /* Concurrent */, true  /* Weak */>();
   199     push_roots<ZWeakRootsIterator,           false /* Concurrent */, true  /* Weak */>();
   206     push_roots<ZConcurrentWeakRootsIterator, true  /* Concurrent */, true  /* Weak */>();
   200     push_roots<ZConcurrentWeakRootsIterator, true  /* Concurrent */, true  /* Weak */>();
   207   }
   201   }
   208 
   202