RFR: 8279910: G1: Simplify HeapRegionRemSet::add_reference

Thomas Schatzl tschatzl at openjdk.java.net
Fri Jan 14 13:13:34 UTC 2022


On Wed, 12 Jan 2022 08:29:29 GMT, Hamlin Li <mli at openjdk.org> wrote:

> HeapRegionRemSet::add_reference checks "state == Untracked" and return if true; it's called at G1RebuildRemSetClosure::do_oop_work and G1ConcurrentRefineOopClosure::do_oop_work respectively.
> 
> The check in HeapRegionRemSet::add_reference could be replaced with an assert, and move the check up to one of the caller G1RebuildRemSetClosure::do_oop_work.

Lgtm.

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

Marked as reviewed by tschatzl (Reviewer).

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



More information about the hotspot-gc-dev mailing list