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

Remove supports_vtime()/elapsedVTime()

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 26
    • 18
    • hotspot
    • gc
    • b05

      os::supports_vtime() and os::elapsedVTime() can be replaced by the os::[current_]thread_cpu_time() API. These APIs get user+sys times, which the new API does too.

      Note that the os::thread_cpu_time() API is supported by all platforms*, so the only user of the old _vtime() API, G1, can just require it.

      *) While in mainline it is not supported on *BSD except OSX, the (in)official externally maintained port at https://github.com/freebsd/openjdk/blob/jdk24u-freebsd/src/hotspot/os/bsd/os_bsd.cpp#L2609 does. There are efforts in progress to upstream the changes (https://mail.openjdk.org/pipermail/bsd-port-dev/2025-June/003231.html)

            tschatzl Thomas Schatzl
            mbaesken Matthias Baesken
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: