8005857: assert in GC_locker from PSOldGen::expand with -XX:+PrintGCDetails and Verbose

Use GC_locker::is_active_and_needs_gc() instead of GC_locker::is_active() for providing information about the reason of heap expansion.

Reviewed-by: jmasa, johnc
This commit is contained in:
Thomas Schatzl 2013-04-02 10:03:02 +02:00
parent d67e393dd6
commit 45cc7f61db

View File

@ -256,7 +256,7 @@ void PSOldGen::expand(size_t bytes) {
}
if (PrintGC && Verbose) {
if (success && GC_locker::is_active()) {
if (success && GC_locker::is_active_and_needs_gc()) {
gclog_or_tty->print_cr("Garbage collection disabled, expanded heap instead");
}
}