1.1 --- a/src/share/vm/memory/gcLocker.cpp Thu Mar 27 17:22:06 2008 -0700 1.2 +++ b/src/share/vm/memory/gcLocker.cpp Tue Apr 01 15:13:47 2008 +0400 1.3 @@ -32,6 +32,12 @@ 1.4 1.5 void GC_locker::stall_until_clear() { 1.6 assert(!JavaThread::current()->in_critical(), "Would deadlock"); 1.7 + if (PrintJNIGCStalls && PrintGCDetails) { 1.8 + ResourceMark rm; // JavaThread::name() allocates to convert to UTF8 1.9 + gclog_or_tty->print_cr( 1.10 + "Allocation failed. Thread \"%s\" is stalled by JNI critical section.", 1.11 + JavaThread::current()->name()); 1.12 + } 1.13 MutexLocker ml(JNICritical_lock); 1.14 // Wait for _needs_gc to be cleared 1.15 while (GC_locker::needs_gc()) {