Concurrent class unloading
166
167 void ZHeapIterator::drain(ObjectClosure* cl) {
168 while (!_visit_stack.is_empty()) {
169 const oop obj = _visit_stack.pop();
170
171 // Visit
172 cl->do_object(obj);
173
174 // Push members to visit
175 ZHeapIteratorPushOopClosure push_cl(this, obj);
176 obj->oop_iterate(&push_cl);
177 }
178 }
179
180 bool ZHeapIterator::visit_referents() const {
181 return _visit_referents;
182 }
183
184 void ZHeapIterator::objects_do(ObjectClosure* cl) {
185 ZHeapIteratorRootOopClosure root_cl(this, cl);
186 ZRootsIterator roots;
187
188 // Follow roots. Note that we also visit the JVMTI weak tag map
189 // as if they were strong roots to make sure we visit all tagged
190 // objects, even those that might now have become unreachable.
191 // If we didn't do this the user would have expected to see
192 // ObjectFree events for unreachable objects in the tag map.
193 roots.oops_do(&root_cl, true /* visit_jvmti_weak_export */);
194 }
|
166
167 void ZHeapIterator::drain(ObjectClosure* cl) {
168 while (!_visit_stack.is_empty()) {
169 const oop obj = _visit_stack.pop();
170
171 // Visit
172 cl->do_object(obj);
173
174 // Push members to visit
175 ZHeapIteratorPushOopClosure push_cl(this, obj);
176 obj->oop_iterate(&push_cl);
177 }
178 }
179
180 bool ZHeapIterator::visit_referents() const {
181 return _visit_referents;
182 }
183
184 void ZHeapIterator::objects_do(ObjectClosure* cl) {
185 ZHeapIteratorRootOopClosure root_cl(this, cl);
186 ZRootsIterator roots(false);
187
188 // Follow roots. Note that we also visit the JVMTI weak tag map
189 // as if they were strong roots to make sure we visit all tagged
190 // objects, even those that might now have become unreachable.
191 // If we didn't do this the user would have expected to see
192 // ObjectFree events for unreachable objects in the tag map.
193 roots.oops_do(&root_cl, true /* visit_jvmti_weak_export */);
194 }
|