comparison src/share/vm/gc_implementation/shared/markSweep.cpp @ 1315:c385bf94cfb8

6935839: excessive marking stack growth during full gcs Summary: process one item at a time from the objarray stack/queue Reviewed-by: apetrusenko, tonyp
author jcoomes
date Thu, 18 Mar 2010 13:31:51 -0700
parents 2a1472c30599
children c18cbe5936b8
comparison
equal deleted inserted replaced
1314:3f0549ed0c98 1315:c385bf94cfb8
109 while (!_marking_stack->is_empty()) { 109 while (!_marking_stack->is_empty()) {
110 oop obj = _marking_stack->pop(); 110 oop obj = _marking_stack->pop();
111 assert (obj->is_gc_marked(), "p must be marked"); 111 assert (obj->is_gc_marked(), "p must be marked");
112 obj->follow_contents(); 112 obj->follow_contents();
113 } 113 }
114 while (!_objarray_stack->is_empty()) { 114 // Process ObjArrays one at a time to avoid marking stack bloat.
115 if (!_objarray_stack->is_empty()) {
115 ObjArrayTask task = _objarray_stack->pop(); 116 ObjArrayTask task = _objarray_stack->pop();
116 objArrayKlass* const k = (objArrayKlass*)task.obj()->blueprint(); 117 objArrayKlass* const k = (objArrayKlass*)task.obj()->blueprint();
117 k->oop_follow_contents(task.obj(), task.index()); 118 k->oop_follow_contents(task.obj(), task.index());
118 } 119 }
119 } while (!_marking_stack->is_empty() || !_objarray_stack->is_empty()); 120 } while (!_marking_stack->is_empty() || !_objarray_stack->is_empty());