diff src/share/vm/memory/gcLocker.cpp @ 142:8bd1e4487c18

Merge
author iveresov
date Sun, 04 May 2008 03:29:31 -0700
parents c0492d52d55b
children d1605aabd0a1
line wrap: on
line diff
--- a/src/share/vm/memory/gcLocker.cpp	Fri May 02 08:22:11 2008 -0700
+++ b/src/share/vm/memory/gcLocker.cpp	Sun May 04 03:29:31 2008 -0700
@@ -32,6 +32,12 @@
 
 void GC_locker::stall_until_clear() {
   assert(!JavaThread::current()->in_critical(), "Would deadlock");
+  if (PrintJNIGCStalls && PrintGCDetails) {
+    ResourceMark rm; // JavaThread::name() allocates to convert to UTF8
+    gclog_or_tty->print_cr(
+      "Allocation failed. Thread \"%s\" is stalled by JNI critical section.",
+      JavaThread::current()->name());
+  }
   MutexLocker   ml(JNICritical_lock);
   // Wait for _needs_gc  to be cleared
   while (GC_locker::needs_gc()) {