RFR: 8369468: Rdtsc: Move getCPUIDBrandString_stub into VM_Version stub area

Axel Boldt-Christmas aboldtch at openjdk.org
Thu Oct 9 06:07:34 UTC 2025


Currently these stubs are created in `Rdtsc::initialize` which may be called from the first ElapsedCounter now call. This causes problems with lock ranks as we may be holding a lock while taking time, because we need to lock the code cache to create a stub.

I suggest we move the `getCPUIDBrandString_stub` next to the other `VM_Version` stubs and generate them together. This is done at the earliest point we can, right after the CodeCache system has been initialized.

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

Commit messages:
 - 8369468: Rdtsc: Move getCPUIDBrandString_stub into VM_Version stub area

Changes: https://git.openjdk.org/jdk/pull/27711/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27711&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8369468
  Stats: 29 lines in 3 files changed: 4 ins; 24 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/27711.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27711/head:pull/27711

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


More information about the hotspot-dev mailing list