diff --git a/src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp b/src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp index 48e3ebb45c5f629f05f1102139d3666a7a7858c1..2cb3b35e09110db47c234e178bfd97c87ee213ab 100644 --- a/src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp +++ b/src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp @@ -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"); } }