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

Stefan Karlsson stefank at openjdk.org
Fri Apr 19 14:06:56 UTC 2024


On Fri, 19 Apr 2024 13:55:08 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

>> 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

Looks good!

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

Marked as reviewed by stefank (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/18863#pullrequestreview-2011524775


More information about the hotspot-gc-dev mailing list