JDK-8369467 : Rdtsc: Remove experimental support for non invariant tsc
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • CPU: x86
  • Submitted: 2025-10-09
  • Updated: 2025-10-21
  • Resolved: 2025-10-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 26
26 b20Fixed
Related Reports
Relates :  
Relates :  
Description
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.
Comments
Changeset: be0e49b7 Branch: master Author: Axel Boldt-Christmas <aboldtch@openjdk.org> Date: 2025-10-14 05:38:13 +0000 URL: https://git.openjdk.org/jdk/commit/be0e49b7e20103ed5c1f3729df1cddf3c9c7ae80
14-10-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/27713 Date: 2025-10-09 06:31:05 +0000
13-10-2025