8068582: UseSerialGC not always set up properly

Reviewed-by: jmasa, brutisso, sjohanss
This commit is contained in:
Per Lidén 2015-04-20 08:53:08 +02:00
parent 0d5c04e00d
commit e4a699552a
5 changed files with 72 additions and 14 deletions

View file

@ -1565,12 +1565,15 @@ void Arguments::select_gc_ergonomically() {
} else {
FLAG_SET_ERGO(bool, UseParallelGC, true);
}
} else {
FLAG_SET_ERGO(bool, UseSerialGC, true);
}
}
void Arguments::select_gc() {
if (!gc_selected()) {
select_gc_ergonomically();
guarantee(gc_selected(), "No GC selected");
}
}
@ -2096,10 +2099,8 @@ bool Arguments::check_gc_consistency() {
}
if (UseParNewGC && !UseConcMarkSweepGC) {
// !UseConcMarkSweepGC means that we are using serial old gc. Unfortunately we don't
// set up UseSerialGC properly, so that can't be used in the check here.
jio_fprintf(defaultStream::error_stream(),
"It is not possible to combine the ParNew young collector with the Serial old collector.\n");
"It is not possible to combine the ParNew young collector with any collector other than CMS.\n");
return false;
}