--- 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) {