hotspot/src/share/vm/runtime/interfaceSupport.cpp
changeset 2995 d8283445992a
parent 1 489c9b5090e2
child 3261 c7d5aae8d3f7
--- a/hotspot/src/share/vm/runtime/interfaceSupport.cpp	Wed Jun 10 14:57:21 2009 -0700
+++ b/hotspot/src/share/vm/runtime/interfaceSupport.cpp	Thu Jun 11 12:40:00 2009 -0700
@@ -66,11 +66,14 @@
 
 void InterfaceSupport::gc_alot() {
   Thread *thread = Thread::current();
-  if (thread->is_VM_thread()) return; // Avoid concurrent calls
+  if (!thread->is_Java_thread()) return; // Avoid concurrent calls
   // Check for new, not quite initialized thread. A thread in new mode cannot initiate a GC.
   JavaThread *current_thread = (JavaThread *)thread;
   if (current_thread->active_handles() == NULL) return;
 
+  // Short-circuit any possible re-entrant gc-a-lot attempt
+  if (thread->skip_gcalot()) return;
+
   if (is_init_completed()) {
 
     if (++_fullgc_alot_invocation < FullGCALotStart) {