RFR: 8199407: Skip Rebuild Remset Phase if there are no rebuild candidates
Ivan Walulya
iwalulya at openjdk.java.net
Mon Apr 12 13:12:01 UTC 2021
On Mon, 12 Apr 2021 12:55:14 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
>> Hi all,
>>
>> Please review this change that skips the rebuild remset phase and the associated updates after rebuild, If during Remark, G1 finds that there are no remembered sets to rebuild.
>>
>> Test: tier1-5
>
> src/hotspot/share/gc/g1/g1ConcurrentMark.cpp line 1324:
>
>> 1322:
>> 1323: verify_during_pause(G1HeapVerifier::G1VerifyCleanup, VerifyOption_G1UsePrevMarking, "Cleanup before");
>> 1324: bool has_rebuilt_remembered_sets = (total_selected_for_rebuild() > 0);
>
> Please add a newline before.
noted, thanks
> src/hotspot/share/gc/g1/g1ConcurrentMark.hpp line 460:
>
>> 458: // set phase at all.
>> 459: HeapWord* volatile* _top_at_rebuild_starts;
>> 460: uint _total_selected_for_rebuild;
>
> Something like `// Number of regions selected for rebuild in the Remark pause` should be added here.
> It seems unnecessary to actually store that number, but sufficient that there is any need to rebuild regions. That would simplify the conditions in two places.
Indeed, a bool has_rebuilt_remembered_sets should suffice.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3434
More information about the hotspot-gc-dev
mailing list