src/share/vm/memory/gcLocker.cpp

changeset 3500
0382d2b469b2
parent 3494
1a2723f7ad8e
child 3571
09d00c18e323
     1.1 --- a/src/share/vm/memory/gcLocker.cpp	Wed Feb 01 07:59:01 2012 -0800
     1.2 +++ b/src/share/vm/memory/gcLocker.cpp	Wed Feb 01 16:57:08 2012 -0800
     1.3 @@ -69,7 +69,7 @@
     1.4      _needs_gc = true;
     1.5      if (PrintJNIGCStalls && PrintGCDetails) {
     1.6        ResourceMark rm; // JavaThread::name() allocates to convert to UTF8
     1.7 -      _wait_begin = tty->time_stamp().milliseconds();
     1.8 +      _wait_begin = os::javaTimeNanos() / NANOSECS_PER_MILLISEC;
     1.9        gclog_or_tty->print_cr(INT64_FORMAT ": Setting _needs_gc. Thread \"%s\" %d locked.",
    1.10                               _wait_begin, Thread::current()->name(), _jni_lock_count);
    1.11      }
    1.12 @@ -86,7 +86,7 @@
    1.13      if (PrintJNIGCStalls && PrintGCDetails) {
    1.14        ResourceMark rm; // JavaThread::name() allocates to convert to UTF8
    1.15        gclog_or_tty->print_cr(INT64_FORMAT ": Allocation failed. Thread \"%s\" is stalled by JNI critical section, %d locked.",
    1.16 -                             tty->time_stamp().milliseconds() - _wait_begin, Thread::current()->name(), _jni_lock_count);
    1.17 +                             (os::javaTimeNanos() / NANOSECS_PER_MILLISEC) - _wait_begin, Thread::current()->name(), _jni_lock_count);
    1.18      }
    1.19    }
    1.20  
    1.21 @@ -132,7 +132,7 @@
    1.22          if (PrintJNIGCStalls && PrintGCDetails) {
    1.23            ResourceMark rm; // JavaThread::name() allocates to convert to UTF8
    1.24            gclog_or_tty->print_cr(INT64_FORMAT ": Thread \"%s\" is performing GC after exiting critical section, %d locked",
    1.25 -                                 tty->time_stamp().milliseconds() - _wait_begin, Thread::current()->name(), _jni_lock_count);
    1.26 +                                 (os::javaTimeNanos() / NANOSECS_PER_MILLISEC) - _wait_begin, Thread::current()->name(), _jni_lock_count);
    1.27          }
    1.28          Universe::heap()->collect(GCCause::_gc_locker);
    1.29        }

mercurial