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

Deprecate the UseLinuxPosixThreadCPUClocks flag and remove it in a future release

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 24
    • 24
    • hotspot
    • b13
    • linux

    Description

      The UseLinuxPosixThreadCPUClocks flag was added in Java 6 (JDK-6200022) to control which of two mechanisms was used to obtain the thread CPU time. When true it caused used of the new clock_gettime API with a suitable CLOCK_THREAD_CPUTIME_ID value. When false it caused use of the existing slower reading of /proc/self/<thread>/stat for the information. At the time the Linux implementation of clock_gettime could be incorrect and so you had to opt-in to the faster mechanism if you knew it was working at runtime.

      In Java 6u23 and 7 UseLinuxPosixThreadCPUClocks was enabled by default (as it greatly improved performance of the associated Java-level API - see JDK-6888526) and you could opt out if your Linux kernel did not support it.

      Roll forward to JDK 24 and there is no reason for anyone to need to opt-out of this code, so the flag can be deprecated and then removed in the next release. We should also be able to remove the original /proc/self/<thread>/stat reading code.

      Attachments

        Issue Links

          Activity

            People

              dholmes David Holmes
              dholmes David Holmes
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: