mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-16 09:04:41 +02:00
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:
parent
2fa0d00635
commit
aa951c36cb
2 changed files with 6 additions and 5 deletions
|
@ -217,21 +217,21 @@ void ParCompactionManager::reset() {
|
||||||
void ParCompactionManager::follow_marking_stacks() {
|
void ParCompactionManager::follow_marking_stacks() {
|
||||||
do {
|
do {
|
||||||
// Drain the overflow stack first, to allow stealing from the marking stack.
|
// Drain the overflow stack first, to allow stealing from the marking stack.
|
||||||
|
oop obj;
|
||||||
while (!overflow_stack()->is_empty()) {
|
while (!overflow_stack()->is_empty()) {
|
||||||
overflow_stack()->pop()->follow_contents(this);
|
overflow_stack()->pop()->follow_contents(this);
|
||||||
}
|
}
|
||||||
oop obj;
|
|
||||||
while (marking_stack()->pop_local(obj)) {
|
while (marking_stack()->pop_local(obj)) {
|
||||||
obj->follow_contents(this);
|
obj->follow_contents(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Process ObjArrays one at a time to avoid marking stack bloat.
|
||||||
ObjArrayTask task;
|
ObjArrayTask task;
|
||||||
while (!_objarray_overflow_stack->is_empty()) {
|
if (!_objarray_overflow_stack->is_empty()) {
|
||||||
task = _objarray_overflow_stack->pop();
|
task = _objarray_overflow_stack->pop();
|
||||||
objArrayKlass* const k = (objArrayKlass*)task.obj()->blueprint();
|
objArrayKlass* const k = (objArrayKlass*)task.obj()->blueprint();
|
||||||
k->oop_follow_contents(this, task.obj(), task.index());
|
k->oop_follow_contents(this, task.obj(), task.index());
|
||||||
}
|
} else if (_objarray_queue.pop_local(task)) {
|
||||||
while (_objarray_queue.pop_local(task)) {
|
|
||||||
objArrayKlass* const k = (objArrayKlass*)task.obj()->blueprint();
|
objArrayKlass* const k = (objArrayKlass*)task.obj()->blueprint();
|
||||||
k->oop_follow_contents(this, task.obj(), task.index());
|
k->oop_follow_contents(this, task.obj(), task.index());
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,7 +111,8 @@ void MarkSweep::follow_stack() {
|
||||||
assert (obj->is_gc_marked(), "p must be marked");
|
assert (obj->is_gc_marked(), "p must be marked");
|
||||||
obj->follow_contents();
|
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();
|
ObjArrayTask task = _objarray_stack->pop();
|
||||||
objArrayKlass* const k = (objArrayKlass*)task.obj()->blueprint();
|
objArrayKlass* const k = (objArrayKlass*)task.obj()->blueprint();
|
||||||
k->oop_follow_contents(task.obj(), task.index());
|
k->oop_follow_contents(task.obj(), task.index());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue