void ParCompactionManager::follow_marking_stacks() { do { // Drain the overflow stack first, to allow stealing from the marking stack. oop obj; while (marking_stack()->pop_overflow(obj)) { follow_contents(obj); } while (marking_stack()->pop_local(obj)) { follow_contents(obj); } // Process ObjArrays one at a time to avoid marking stack bloat. ObjArrayTask task; if (_objarray_stack.pop_overflow(task) || _objarray_stack.pop_local(task)) { follow_contents((objArrayOop)task.obj(), task.index()); } } while (!marking_stacks_empty()); assert(marking_stacks_empty(), "Sanity"); }
ParCompactionManager::ParCompactionManager() : _action(CopyAndUpdate), _region_stack(NULL), _region_stack_index((uint)max_uintx) { ParallelScavengeHeap* heap = ParallelScavengeHeap::heap(); _old_gen = heap->old_gen(); _start_array = old_gen()->start_array(); marking_stack()->initialize(); _objarray_stack.initialize(); }
ParCompactionManager::ParCompactionManager() : _action(CopyAndUpdate), _region_stack(NULL), _region_stack_index((uint)max_uintx) { ParallelScavengeHeap* heap = (ParallelScavengeHeap*)Universe::heap(); assert(heap->kind() == CollectedHeap::ParallelScavengeHeap, "Sanity"); _old_gen = heap->old_gen(); _start_array = old_gen()->start_array(); marking_stack()->initialize(); _objarray_stack.initialize(); }
ParCompactionManager::ParCompactionManager() : _action(CopyAndUpdate) { ParallelScavengeHeap* heap = ParallelScavengeHeap::heap(); _old_gen = heap->old_gen(); _start_array = old_gen()->start_array(); marking_stack()->initialize(); _objarray_stack.initialize(); _region_stack.initialize(); reset_bitmap_query_cache(); }
void ParCompactionManager::follow_marking_stacks() { do { // Drain the overflow stack first, to allow stealing from the marking stack. oop obj; while (marking_stack()->pop_overflow(obj)) { obj->follow_contents(this); } while (marking_stack()->pop_local(obj)) { obj->follow_contents(this); } // Process ObjArrays one at a time to avoid marking stack bloat. ObjArrayTask task; if (_objarray_stack.pop_overflow(task)) { objArrayKlass* const k = (objArrayKlass*)task.obj()->blueprint(); k->oop_follow_contents(this, task.obj(), task.index()); } else if (_objarray_stack.pop_local(task)) { objArrayKlass* const k = (objArrayKlass*)task.obj()->blueprint(); k->oop_follow_contents(this, task.obj(), task.index()); } } while (!marking_stacks_empty()); assert(marking_stacks_empty(), "Sanity"); }