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

Remove the possibility to use RDTSC when the CPU does not have support for invariant TSC

XMLWordPrintable

      Today JFR can use either operating system time source or RDTSC (on x86). When using RDTSC, there is a check for if the CPU supports `invariant TSC`. If the CPU has no such support, the OS timer is used, *unless* `-XX:+UseFastUnorderedTimeStamps` is used.

      Modern Processors generally support `invariant TSC`, however sometime the support is removed when running in a virtual machine.

      Running without `invariant TSC` has several drawbacks, a steady frequency is not guaranteed, nor is forward movement. If we remove support for this, timers will behave better, and we can also remove code for frequency detection that is in nature unsound, especially in user space where we do not control frequency scaling and CPU boost.

      In addition to removing code paths for "variant" TSC, we should also document the flag UseFastUnorderedTimeStamps, and possibly even change the name.

            dholmes David Holmes
            lkorinth Leo Korinth
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: