RFR: 8373256: [leyden] Pack DataKind more densely in archive

Aleksey Shipilev shade at openjdk.org
Mon Dec 8 13:32:42 UTC 2025


Spotting a little inefficiency when looking at related code. `DataKind` is always stored as `int`, but its values are actually comfortably fitting in byte. Going to `int8_t` saves about 1% of AOT cache size. If this ever becomes a problem, we can always revert back to `int32_t`. I looked around other uses of `write_bytes`, and I believe `DataKind` is the most obvious opportunity.

Additional testing:
 - [x] Linux x86_64 server fastdebug, `runtime/cds`

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

Commit messages:
 - Fix

Changes: https://git.openjdk.org/leyden/pull/105/files
  Webrev: https://webrevs.openjdk.org/?repo=leyden&pr=105&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8373256
  Stats: 23 lines in 2 files changed: 0 ins; 0 del; 23 mod
  Patch: https://git.openjdk.org/leyden/pull/105.diff
  Fetch: git fetch https://git.openjdk.org/leyden.git pull/105/head:pull/105

PR: https://git.openjdk.org/leyden/pull/105


More information about the leyden-dev mailing list