RFR: 8321269: Require platforms to define DEFAULT_CACHE_LINE_SIZE

Aleksey Shipilev shade at openjdk.org
Mon Dec 4 14:00:58 UTC 2023


Found it while doing new code that wants to know the cache line size. Currently, there is a fallback in `globalDefinitions.hpp` that defaults `DEFAULT_CACHE_LINE_SIZE` to `64` if platform does not define it. Instead of relying on default, force platform definitions to tell what is the reasonable default for the platform. This would simplify porting to other architectures, with less surprises for them.

The actual sizes do not change. If any existing platform needs adjustments, those should be handled as separate issues.

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

Commit messages:
 - Fix

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

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


More information about the hotspot-dev mailing list