RFR: 8328508: Unify the signatures of the methods 'address_for_index' and 'index_for'

Guoxiong Li gli at openjdk.org
Wed Mar 20 17:32:33 UTC 2024


Hi all,

This patch unifies the related methods of the block offset table in Serial, Parallel and GC. It mainly removes the methods `SerialBlockOffsetSharedArray::address_for_index`, `SerialBlockOffsetSharedArray::index_for`, `G1BlockOffsetTable::address_for_index` and `G1BlockOffsetTable::index_for` and adds the corresponding methods `addr_for_entry` and `entry_for_addr`. Their usages and the signatures of other methods are also adjusted.

I find some duplicated code of the block offset table in Serial and Parallel (and less in G1). Maybe, we should refactor the block offset table to reduce the duplicated code in the future.

Tier-1 is running locally.

Thanks for taking the time to review.

Best Regards,
-- Guoxiong

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

Commit messages:
 - JDK-8328508

Changes: https://git.openjdk.org/jdk/pull/18405/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18405&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8328508
  Stats: 195 lines in 11 files changed: 4 ins; 58 del; 133 mod
  Patch: https://git.openjdk.org/jdk/pull/18405.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18405/head:pull/18405

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


More information about the hotspot-gc-dev mailing list