RFR: 7903912: JMH: Pad using a mix of bytes and longs

Claes Redestad redestad at openjdk.org
Mon Dec 16 12:10:01 UTC 2024


Using a mix of bytes and longs we should get the gap-filling effect described in https://shipilev.net/jvm/objects-inside-out/#_observation_hierarchy_tower_padding_trick_collapse_in_jdk_15 while reducing size of generated code by roughly 20%:


864772  jmh-samples/target/jmh-samples-1.38-SNAPSHOT.jar
490531  jmh-samples/target/jmh-samples-1.38-SNAPSHOT-sources.jar

684383 jmh-samples/target/jmh-samples-1.38-SNAPSHOT.jar
399758 jmh-samples/target/jmh-samples-1.38-SNAPSHOT-sources.jar

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

Commit messages:
 - Adjust hierarchical padding in static code
 - Superficial comment change to trigger pre-integration tests
 - Pad with a mix of bytes and longs

Changes: https://git.openjdk.org/jmh/pull/147/files
  Webrev: https://webrevs.openjdk.org/?repo=jmh&pr=147&range=00
  Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903912
  Stats: 217 lines in 7 files changed: 16 ins; 156 del; 45 mod
  Patch: https://git.openjdk.org/jmh/pull/147.diff
  Fetch: git fetch https://git.openjdk.org/jmh.git pull/147/head:pull/147

PR: https://git.openjdk.org/jmh/pull/147


More information about the jmh-dev mailing list