4396719: Mark Sweep stack overflow on deeply nested Object arrays

Use an explicit stack for object arrays and process them in chunks.

Reviewed-by: iveresov, apetrusenko
This commit is contained in:
John Coomes 2010-03-03 14:48:26 -08:00
parent 5fdec09798
commit 4f82340476
26 changed files with 419 additions and 182 deletions

View file

@ -1346,9 +1346,7 @@ void Arguments::set_g1_gc_flags() {
}
if (FLAG_IS_DEFAULT(MarkStackSize)) {
// Size as a multiple of TaskQueueSuper::N which is larger
// for 64-bit.
FLAG_SET_DEFAULT(MarkStackSize, 128 * TaskQueueSuper::total_size());
FLAG_SET_DEFAULT(MarkStackSize, 128 * TASKQUEUE_SIZE);
}
if (PrintGCDetails && Verbose) {
tty->print_cr("MarkStackSize: %uk MarkStackSizeMax: %uk",

View file

@ -1795,6 +1795,10 @@ class CommandLineFlags {
product(uintx, PreserveMarkStackSize, 1024, \
"Size for stack used in promotion failure handling") \
\
develop(uintx, ObjArrayMarkingStride, 512, \
"Number of ObjArray elements to push onto the marking stack" \
"before pushing a continuation entry") \
\
product_pd(bool, UseTLAB, "Use thread-local object allocation") \
\
product_pd(bool, ResizeTLAB, \