RFR: 8330585: Refactor/rename forwardee handling [v2]

Roman Kennke rkennke at openjdk.org
Fri Apr 19 13:55:08 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

Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:

  Don't add API in oopDesc

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/18863/files
  - new: https://git.openjdk.org/jdk/pull/18863/files/22b1e990..7223845f

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=18863&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18863&range=00-01

  Stats: 26 lines in 6 files changed: 4 ins; 12 del; 10 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-gc-dev mailing list