< prev index next > src/hotspot/share/gc/serial/serialFullGC.cpp
Print this page
template <class T> void SerialFullGC::KeepAliveClosure::do_oop_work(T* p) {
mark_and_push(p);
}
void SerialFullGC::push_objarray(oop obj, size_t index) {
+ assert(obj->is_refArray(), "Must be");
ObjArrayTask task(obj, index);
assert(task.is_valid(), "bad ObjArrayTask");
_objarray_stack.push(task);
}
}
}
void SerialFullGC::follow_object(oop obj) {
assert(obj->is_gc_marked(), "should be marked");
! if (obj->is_objArray()) {
// Handle object arrays explicitly to allow them to
// be split into chunks if needed.
SerialFullGC::follow_array((objArrayOop)obj);
} else {
obj->oop_iterate(&mark_and_push_closure);
}
}
void SerialFullGC::follow_object(oop obj) {
assert(obj->is_gc_marked(), "should be marked");
! if (obj->is_refArray()) {
// Handle object arrays explicitly to allow them to
// be split into chunks if needed.
SerialFullGC::follow_array((objArrayOop)obj);
} else {
obj->oop_iterate(&mark_and_push_closure);
assert(beg_index < len || len == 0, "index too large");
const int stride = MIN2(len - beg_index, (int) ObjArrayMarkingStride);
const int end_index = beg_index + stride;
! array->oop_iterate_range(&mark_and_push_closure, beg_index, end_index);
if (end_index < len) {
SerialFullGC::push_objarray(array, end_index); // Push the continuation.
}
}
assert(beg_index < len || len == 0, "index too large");
const int stride = MIN2(len - beg_index, (int) ObjArrayMarkingStride);
const int end_index = beg_index + stride;
! refArrayOop(array)->oop_iterate_range(&mark_and_push_closure, beg_index, end_index);
if (end_index < len) {
SerialFullGC::push_objarray(array, end_index); // Push the continuation.
}
}
< prev index next >