src/share/vm/runtime/interfaceSupport.cpp

changeset 1241
821269eca479
parent 435
a61af66fc99e
child 1279
bd02caa94611
equal deleted inserted replaced
1235:7295839252de 1241:821269eca479
64 tty->print_cr("%6d %s", _number_of_calls, header); 64 tty->print_cr("%6d %s", _number_of_calls, header);
65 } 65 }
66 66
67 void InterfaceSupport::gc_alot() { 67 void InterfaceSupport::gc_alot() {
68 Thread *thread = Thread::current(); 68 Thread *thread = Thread::current();
69 if (thread->is_VM_thread()) return; // Avoid concurrent calls 69 if (!thread->is_Java_thread()) return; // Avoid concurrent calls
70 // Check for new, not quite initialized thread. A thread in new mode cannot initiate a GC. 70 // Check for new, not quite initialized thread. A thread in new mode cannot initiate a GC.
71 JavaThread *current_thread = (JavaThread *)thread; 71 JavaThread *current_thread = (JavaThread *)thread;
72 if (current_thread->active_handles() == NULL) return; 72 if (current_thread->active_handles() == NULL) return;
73
74 // Short-circuit any possible re-entrant gc-a-lot attempt
75 if (thread->skip_gcalot()) return;
73 76
74 if (is_init_completed()) { 77 if (is_init_completed()) {
75 78
76 if (++_fullgc_alot_invocation < FullGCALotStart) { 79 if (++_fullgc_alot_invocation < FullGCALotStart) {
77 return; 80 return;

mercurial