6935839: excessive marking stack growth during full gcs

Process one item at a time from the objarray stack/queue

Reviewed-by: apetrusenko, tonyp
This commit is contained in:
John Coomes 2010-03-18 13:31:51 -07:00
parent 2fa0d00635
commit aa951c36cb
2 changed files with 6 additions and 5 deletions

View file

@ -111,7 +111,8 @@ void MarkSweep::follow_stack() {
assert (obj->is_gc_marked(), "p must be marked");
obj->follow_contents();
}
while (!_objarray_stack->is_empty()) {
// Process ObjArrays one at a time to avoid marking stack bloat.
if (!_objarray_stack->is_empty()) {
ObjArrayTask task = _objarray_stack->pop();
objArrayKlass* const k = (objArrayKlass*)task.obj()->blueprint();
k->oop_follow_contents(task.obj(), task.index());