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
1 file changed