RFR: 8325643: G1: Refactor G1FlushHumongousCandidateRemSets

Kim Barrett kbarrett at openjdk.org
Mon Feb 12 19:06:05 UTC 2024


On Mon, 12 Feb 2024 15:21:17 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

> Simple refactoring to ensure both paths are checked regarding remset status.

Changes requested by kbarrett (Reviewer).

src/hotspot/share/gc/g1/g1RemSet.cpp line 1196:

> 1194: 
> 1195:       assert(r->rem_set()->is_empty(), "must be empty after flushing");
> 1196:       assert(r->rem_set()->is_complete(), "should still be after flushing");

I think these asserts belong inside the if-not-empty body. Both have already
been checked already in the empty-case, and there's nothing to change them.
Only the flushing in the if-not-empty body could change them.

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

PR Review: https://git.openjdk.org/jdk/pull/17808#pullrequestreview-1875978244
PR Review Comment: https://git.openjdk.org/jdk/pull/17808#discussion_r1486637376


More information about the hotspot-gc-dev mailing list