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

Roman Kennke rkennke at openjdk.org
Mon Jun 12 09:35:52 UTC 2023


On Thu, 8 Jun 2023 14:09:08 GMT, Guoxiong Li <gli at openjdk.org> wrote:

>> Hi all,
>> 
>> This patch removes the class `markSweep.hpp::PreservedMark` and uses the shared `PreservedMarksSet` instead.
>> 
>> In order to keep the meaning of the field `_preserved_marks` in `markSweep`,
>> I need to use `OopAndMarkWord` explicitly. So I move `OopAndMarkWord` out of `PreservedMarks`.
>> 
>> Tests:
>> `hotspot:tier1` passed locally (x86 & linux).
>> 
>> Thanks for the review.
>> 
>> Best Regards,
>> -- Guoxiong
>
> Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Rename OopAndMarkWork to PreservedMark.

This is a nice improvement! All looks good to me, I only have a relatively minor naming question, I leave it up to you to change it or not.

src/hotspot/share/gc/shared/preservedMarks.hpp line 52:

> 50: class PreservedMarks {
> 51: private:
> 52:   typedef Stack<PreservedMark, mtGC> OopAndMarkWordStack;

You renamed OopAndMarkWord to PreservedMark, which I like. Maybe you also want to rename OopAndMarkWordStack to PreservedMarkStack? Otherwise it looks confusing I think.

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

Marked as reviewed by rkennke (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/14274#pullrequestreview-1474471871
PR Review Comment: https://git.openjdk.org/jdk/pull/14274#discussion_r1226366710


More information about the hotspot-gc-dev mailing list