RFR: 8300915: G1: incomplete SATB because nmethod entry barriers don't get armed [v2]

Thomas Schatzl tschatzl at openjdk.org
Wed Jan 25 20:45:39 UTC 2023


On Wed, 25 Jan 2023 16:28:00 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:

> Does this change consider the case when we do an initiating mark YC, but there were no old objects, and hence the "finished" part is never executed as CM is skipped? It isn't obvious to me that said case is handled correctly.

Not sure this is what you were looking for, but the code adds the `CodeCache::on_gc_marking_cycle_finish() + arm` calls at the end of the concurrent start gc (still within the pause) by `G1ConcurrentMark::post_concurrent_undo_start`.
This is when G1 "skips" the concurrent mark.

There is no possibility for G1 to completely do nothing e.g. in the case when there are no old regions. It always needs to do the "Undo Mark" stuff.

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

PR: https://git.openjdk.org/jdk/pull/12194


More information about the hotspot-gc-dev mailing list