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

GetCurrentThreadCpuTime returns wrong information

XMLWordPrintable

    • 11
    • generic, x86
    • generic, linux, windows_nt

        daniel.daugherty@Eng 2000-11-09

        While working on the following bug:

        4379126 3/5 Internal Error at os_linux.cpp, 1689 (Linux)

        Karen noticed that the HotSpot implementation of GetCurrentThreadCpuTime()
        was returning incorrect information. On Solaris and Linux, it returns
        information relative to current system time and not current thread CPU
        time.

        My fix for the Linux crash leverages off os::elapsed_counter() and
        I noticed that this function returns different information on Solaris
        and Linux. On Solaris, the return is current_time - VM_start_time,
        which is effectively how much time the VM has been up and running.
        On Linux, the return is current_time. Not the same thing at all.

              xjiangsunw Xuyang Jiang (Inactive)
              dcubed Daniel Daugherty
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: