src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp

changeset 1750
c385bf94cfb8
parent 1746
2a1472c30599
child 1907
c18cbe5936b8
     1.1 --- a/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp	Thu Mar 18 01:48:28 2010 -0700
     1.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp	Thu Mar 18 13:31:51 2010 -0700
     1.3 @@ -217,21 +217,21 @@
     1.4  void ParCompactionManager::follow_marking_stacks() {
     1.5    do {
     1.6      // Drain the overflow stack first, to allow stealing from the marking stack.
     1.7 +    oop obj;
     1.8      while (!overflow_stack()->is_empty()) {
     1.9        overflow_stack()->pop()->follow_contents(this);
    1.10      }
    1.11 -    oop obj;
    1.12      while (marking_stack()->pop_local(obj)) {
    1.13        obj->follow_contents(this);
    1.14      }
    1.15  
    1.16 +    // Process ObjArrays one at a time to avoid marking stack bloat.
    1.17      ObjArrayTask task;
    1.18 -    while (!_objarray_overflow_stack->is_empty()) {
    1.19 +    if (!_objarray_overflow_stack->is_empty()) {
    1.20        task = _objarray_overflow_stack->pop();
    1.21        objArrayKlass* const k = (objArrayKlass*)task.obj()->blueprint();
    1.22        k->oop_follow_contents(this, task.obj(), task.index());
    1.23 -    }
    1.24 -    while (_objarray_queue.pop_local(task)) {
    1.25 +    } else if (_objarray_queue.pop_local(task)) {
    1.26        objArrayKlass* const k = (objArrayKlass*)task.obj()->blueprint();
    1.27        k->oop_follow_contents(this, task.obj(), task.index());
    1.28      }

mercurial