RFR: 8272160: Avoid using 32-bit counters in CDS code

Matias Saavedra Silva matsaave at openjdk.org
Tue Nov 4 19:25:48 UTC 2025


There are a handful of counters in CDS code that are `int` when it would be safer to use size_t. While exploring this I discovered that the `_count` field in DumpTimeKlassSubGraphInfoTable is unused so it is removed and the one use case replaced with a more accurate value. Verified with tier1-5 tests.

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

Commit messages:
 - 8272160: Avoid using 32-bit counters in CDS code

Changes: https://git.openjdk.org/jdk/pull/28139/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28139&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8272160
  Stats: 8 lines in 3 files changed: 0 ins; 3 del; 5 mod
  Patch: https://git.openjdk.org/jdk/pull/28139.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28139/head:pull/28139

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


More information about the hotspot-runtime-dev mailing list