120 // We're the last thread out. Cause a GC to occur. |
120 // We're the last thread out. Cause a GC to occur. |
121 // GC will also check is_active, so this check is not |
121 // GC will also check is_active, so this check is not |
122 // strictly needed. It's added here to make it clear that |
122 // strictly needed. It's added here to make it clear that |
123 // the GC will NOT be performed if any other caller |
123 // the GC will NOT be performed if any other caller |
124 // of GC_locker::lock() still needs GC locked. |
124 // of GC_locker::lock() still needs GC locked. |
125 if (!is_active()) { |
125 if (!is_active_internal()) { |
126 _doing_gc = true; |
126 _doing_gc = true; |
127 { |
127 { |
128 // Must give up the lock while at a safepoint |
128 // Must give up the lock while at a safepoint |
129 MutexUnlocker munlock(JNICritical_lock); |
129 MutexUnlocker munlock(JNICritical_lock); |
130 if (PrintJNIGCStalls && PrintGCDetails) { |
130 if (PrintJNIGCStalls && PrintGCDetails) { |