RFR: 8199407: Skip Rebuild Remset Phase if there are no rebuild candidates
Thomas Schatzl
tschatzl at openjdk.java.net
Mon Apr 12 13:03:48 UTC 2021
On Mon, 12 Apr 2021 11:14:20 GMT, Ivan Walulya <iwalulya 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
Would it be possible to add a test that checks for this case?
I.e. allocate some objects of the approximate amount of a region, keeping them live, do a full gc to move them to old gen, then start a concurrent cycle that should print that new message?
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.
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.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3434
More information about the hotspot-gc-dev
mailing list