RFR: 8281035: Serial: Move RemoveForwardedPointerClosure to local scope [v2]

Albert Mingkun Yang ayang at openjdk.java.net
Wed Feb 2 10:47:10 UTC 2022


On Tue, 1 Feb 2022 16:45:20 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Albert Mingkun Yang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   review
>
> src/hotspot/share/gc/serial/defNewGeneration.cpp line 680:
> 
>> 678:     void do_object(oop obj) override {
>> 679:       if (obj->is_forwarded()) {
>> 680:         obj->init_mark();
> 
> Since it is available, probably use `PreservedMarks::init_forwarded_mark` here.

This closure is not really for "preserved marks", so calling `PreservedMarks::XXX` can be confusing. I will keep the current code and investigate the possibility of removing `PreservedMarks::init_forwarded_mark` in another PR --- its caller should not know anything about "preserved marks" either.

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

PR: https://git.openjdk.java.net/jdk/pull/7301



More information about the hotspot-gc-dev mailing list