RFR: 8199407: Skip Rebuild Remset Phase if there are no rebuild candidates

Thomas Schatzl tschatzl at openjdk.java.net
Mon Apr 12 13:33:41 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

Changes requested by tschatzl (Reviewer).

src/hotspot/share/gc/g1/g1ConcurrentMark.cpp line 1330:

> 1328:     _g1h->heap_region_iterate(&cl);
> 1329:   } else {
> 1330:     log_debug(gc, remset, tracking)("No Remembered Sets To Update After Rebuild");

Maybe make this `gc+phases=debug` too like the one above so that either of those shows up with the same log options. Also there does not seem to be a reason for the upper casing here. (The argument to `GCTraceTime` is a phase name, but this seems like a regular statement)

src/hotspot/share/gc/g1/g1ConcurrentMark.cpp line 1962:

> 1960:   // skip the rebuild remembered set phase
> 1961:   if (total_selected_for_rebuild() == 0) {
> 1962:     log_debug(gc, remset, tracking)("Skipping Remembered Set Rebuild. No Regions Selected For Rebuild.");

Maybe better is `log_debug(gc, marking)` here, somewhat fitting with the other messages when running with `gc+marking=debug`. Also the upper casing the in the second sentence seems weird, `No regions selected for rebuild` seems better (`Remembered Set Rebuild` is the name of that phase, and we do the upper casing for them already. But the second statement seems to be a regular statement)

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

PR: https://git.openjdk.java.net/jdk/pull/3434



More information about the hotspot-gc-dev mailing list