src/share/vm/memory/gcLocker.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/memory/gcLocker.cpp	Tue Feb 14 12:24:14 2012
--- new/src/share/vm/memory/gcLocker.cpp	Tue Feb 14 12:24:13 2012

*** 29,39 **** --- 29,38 ---- volatile jint GC_locker::_jni_lock_count = 0; volatile jint GC_locker::_lock_count = 0; volatile bool GC_locker::_needs_gc = false; volatile bool GC_locker::_doing_gc = false; jlong GC_locker::_wait_begin = 0; #ifdef ASSERT volatile jint GC_locker::_debug_jni_lock_count = 0; #endif
*** 67,79 **** --- 66,77 ---- if (is_active() && !_needs_gc) { verify_critical_count(); _needs_gc = true; if (PrintJNIGCStalls && PrintGCDetails) { ResourceMark rm; // JavaThread::name() allocates to convert to UTF8 _wait_begin = os::javaTimeNanos() / NANOSECS_PER_MILLISEC; gclog_or_tty->print_cr(INT64_FORMAT ": Setting _needs_gc. Thread \"%s\" %d locked.", _wait_begin, Thread::current()->name(), _jni_lock_count); + gclog_or_tty->print_cr("%.3f: Setting _needs_gc. Thread \"%s\" %d locked.", + gclog_or_tty->time_stamp().seconds(), Thread::current()->name(), _jni_lock_count); } } return is_active(); }
*** 83,94 **** --- 81,92 ---- MutexLocker ml(JNICritical_lock); if (needs_gc()) { if (PrintJNIGCStalls && PrintGCDetails) { ResourceMark rm; // JavaThread::name() allocates to convert to UTF8 ! gclog_or_tty->print_cr(INT64_FORMAT ": Allocation failed. Thread \"%s\" is stalled by JNI critical section, %d locked.", ! (os::javaTimeNanos() / NANOSECS_PER_MILLISEC) - _wait_begin, Thread::current()->name(), _jni_lock_count); ! gclog_or_tty->print_cr("%.3f: Allocation failed. Thread \"%s\" is stalled by JNI critical section, %d locked.", ! gclog_or_tty->time_stamp().seconds(), Thread::current()->name(), _jni_lock_count); } } // Wait for _needs_gc to be cleared while (needs_gc()) {
*** 129,140 **** --- 127,138 ---- { // Must give up the lock while at a safepoint MutexUnlocker munlock(JNICritical_lock); if (PrintJNIGCStalls && PrintGCDetails) { ResourceMark rm; // JavaThread::name() allocates to convert to UTF8 ! gclog_or_tty->print_cr(INT64_FORMAT ": Thread \"%s\" is performing GC after exiting critical section, %d locked", ! (os::javaTimeNanos() / NANOSECS_PER_MILLISEC) - _wait_begin, Thread::current()->name(), _jni_lock_count); ! gclog_or_tty->print_cr("%.3f: Thread \"%s\" is performing GC after exiting critical section, %d locked", ! gclog_or_tty->time_stamp().seconds(), Thread::current()->name(), _jni_lock_count); } Universe::heap()->collect(GCCause::_gc_locker); } _doing_gc = false; }

src/share/vm/memory/gcLocker.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File