src/share/vm/memory/gcLocker.cpp
Print this page
*** 120,130 ****
// We're the last thread out. Cause a GC to occur.
// GC will also check is_active, so this check is not
// strictly needed. It's added here to make it clear that
// the GC will NOT be performed if any other caller
// of GC_locker::lock() still needs GC locked.
! if (!is_active()) {
_doing_gc = true;
{
// Must give up the lock while at a safepoint
MutexUnlocker munlock(JNICritical_lock);
if (PrintJNIGCStalls && PrintGCDetails) {
--- 120,130 ----
// We're the last thread out. Cause a GC to occur.
// GC will also check is_active, so this check is not
// strictly needed. It's added here to make it clear that
// the GC will NOT be performed if any other caller
// of GC_locker::lock() still needs GC locked.
! if (!is_active_internal()) {
_doing_gc = true;
{
// Must give up the lock while at a safepoint
MutexUnlocker munlock(JNICritical_lock);
if (PrintJNIGCStalls && PrintGCDetails) {