RFR: 8276887: G1: Move precleaning to Concurrent Mark From Roots subphase [v4]
Kim Barrett
kbarrett at openjdk.java.net
Sun Nov 14 22:39:38 UTC 2021
On Sat, 13 Nov 2021 09:42:07 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> Simple change of moving the "Preclean" subphase into "Mark from roots" subphase so that precleaning becomes parallel automatically. Evaluation using a contrived java program shows that multiple GC threads do precleaning. More detailed testing results are available in the JBS ticket.
>>
>> Test: hotspot_gc
>
> Albert Mingkun Yang has updated the pull request incrementally with one additional commit since the last revision:
>
> review
Changes requested by kbarrett (Reviewer).
src/hotspot/share/gc/shared/referenceProcessor.cpp line 1075:
> 1073: constexpr int ref_kinds = 4;
> 1074: ReferenceType ref_type_arr[] = { REF_SOFT, REF_WEAK, REF_FINAL, REF_PHANTOM };
> 1075: static_assert(ARRAY_SIZE(ref_type_arr) == ref_kinds, "invariant");
I don't think there's a need for the literal 4 initializer for ref_kinds and the static assert to verify it's correct. Why not just use this after the declaration of `ref_type_arr`?
`constexpr int ref_kinds = ARRAY_SIZE(ref_type_arr);`
-------------
PR: https://git.openjdk.java.net/jdk/pull/6327
More information about the hotspot-gc-dev
mailing list