Integrated: 8369467: Rdtsc: Remove experimental support for non invariant tsc

Axel Boldt-Christmas aboldtch at openjdk.org
Tue Oct 14 05:41:18 UTC 2025


On Thu, 9 Oct 2025 06:31:05 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: be0e49b7
Author:    Axel Boldt-Christmas <aboldtch at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/be0e49b7e20103ed5c1f3729df1cddf3c9c7ae80
Stats:     102 lines in 2 files changed: 6 ins; 81 del; 15 mod

8369467: Rdtsc: Remove experimental support for non invariant tsc

Reviewed-by: dholmes, mgronlun

-------------

PR: https://git.openjdk.org/jdk/pull/27713


More information about the hotspot-dev mailing list