RFR: 8369467: Rdtsc: Remove experimental support for non invariant tsc [v3]
David Holmes
dholmes at openjdk.org
Tue Oct 14 03:52:03 UTC 2025
On Mon, 13 Oct 2025 12:43:24 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.
>
> Axel Boldt-Christmas has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits:
>
> - Merge remote-tracking branch 'upstream_jdk/master' into JDK-8369467
> - Rdtsc: Remove experimental support for non invariant tsc
> - 8369467: Rdtsc: Avoid initialize_elapsed_counter when UseFastUnorderedTimeStamps will be disabled
> - 8369469: Rdtsc: Remove potential races in Rdtsc::initialize
> - 8369468: Rdtsc: Move getCPUIDBrandString_stub into VM_Version stub area
Marked as reviewed by dholmes (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/27713#pullrequestreview-3333795496
More information about the hotspot-dev
mailing list