Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6200022

JVMTI GetCurrentThreadCpuTime slow on Linux

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 6
    • 6
    • hotspot
    • b91
    • generic
    • linux

      This bug is filed to remind us to re-examine the implementation of the GetCurrentThreadCpuTime function on Linux. Currently it opens /proc/<pid>/stat or /proc/<pid>/cpu (depending on the kernel version), and then closes the file. This makes the function impratical to use in a profiler.

      The not-yet-release 2.6.10 kernel appers to add posix compliant process clocks. This may mean that we can use pthread_getcpuclockid to read the clock for the current and other threads.
      Here's the info on the new POSIX clock support:
         http://sources.redhat.com/ml/libc-alpha/2004-10/msg00117.html

            sspitsyn Serguei Spitsyn
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: