RFR: 8272147: Consolidate preserved marks handling with other STW collectors [v2]

Guoxiong Li gli at openjdk.org
Wed Jun 7 12:05:57 UTC 2023


On Wed, 7 Jun 2023 11:17:20 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Guoxiong Li has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>> 
>>  - Use the method 'adjust_during_full_gc' and polish the included header.
>>  - Merge branch 'master' into JDK-8272147
>>  - JDK-8272147
>
> src/hotspot/share/gc/serial/markSweep.cpp line 156:
> 
>> 154:     _preserved_marks[_preserved_count++] = OopAndMarkWord(obj, mark);
>> 155:   } else {
>> 156:     _preserved_overflow_stack_set.get()->push_if_necessary(obj, mark);
> 
> Why not `push_always`? I'd expect this mark must be preserved.

Will fix it later.

> I wonder if one can add new API in PreservedMarks to adjust oops.

Should I add it in this patch? And, if such method is added, the method `PreservedMarks::adjust_during_full_gc` can use it too.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14274#discussion_r1221465866
PR Review Comment: https://git.openjdk.org/jdk/pull/14274#discussion_r1221466102


More information about the hotspot-gc-dev mailing list