RFR: 8330585: Refactor/rename forwardee handling

Roman Kennke rkennke at openjdk.org
Fri Apr 19 12:31:11 UTC 2024


In several places in GCs we use is_marked() where we really mean is_forwarded(), and do weird things like decode forwardee directly from a markWord instead of using a proper helper, etc.

This change cleans it up. It introduces a bunch of APIs to facilitate that: 
 - oopDesc::forwardee(markWord): This doesn't have to be in oopDesc right now, but I'd like to put it there in preparation of https://bugs.openjdk.org/browse/JDK-8305898, which requires it to be in oopDesc. Also, it's nice as a non-racy companion of oopDesc::forwardee().
 - oopDesc::is_forwarded(markWord): It doesn't have to be in oopDesc, either, but I think it's good to have it at the same level of API abstraction as oopDesc::forwardee(markWord).

Testing:
 - [x] hotspot_gc
 - [x] tier1

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

Commit messages:
 - 8330585: Refactor/rename forwardee handling

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

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


More information about the hotspot-dev mailing list