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

Rdtsc: Remove experimental support for non invariant tsc

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • hotspot
    • None

      Original issue text:
      ```
      Rdtsc: Avoid initialize_elapsed_counter when UseFastUnorderedTimeStamps will be disabled
      The feature to use rdtsc when it is not invariant requires us to set `UseFastUnorderedTimeStamps`. However, the current implementation always does `do_time_measurements` first, which adds an accumulative 3 ms of sleeps during bootstrapping. While most modern hardware supports invariant tsc, we have observed that many virtualized environments disable this even if it is running on supported hardware. Which means that doing this adds to our startup time even if the feature is never used on many common deployments.

      I suggest we do some checking before deciding to call initialize_elapsed_counter and avoid it if we know we will not use rdtsc regardless of the outcome.
      ```

      After discussion we decided to remove the experimental support for using rdtsc when invariant tsc is not available. After this change UseFastUnorderedTimeStamps is effectively only used to turn of the feature on systems with invariant tsc.

            aboldtch Axel Boldt-Christmas
            aboldtch Axel Boldt-Christmas
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: