RFR: 8300915: G1: incomplete SATB because nmethod entry barriers don't get armed [v3]
Richard Reingruber
rrich at openjdk.org
Wed Jan 25 21:10:33 UTC 2023
On Wed, 25 Jan 2023 20:37:08 GMT, Thomas Schatzl <tschatzl 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`.
Thanks for stepping in @tschatzl . I wasn't quite sure if "... as CM is skipped ..." referred to the 'Undo' of the marking start or something else I wasn't aware of. I agree with your answer.
I'd also point out that with this change the nmethod entry barriers will always be armed when concurrent marking begins.
Also if CM is skipped `CodeCache::_gc_epoch` will be incremented. This has the effect that nmethods appear cooler that before this pr. I didn't think this was not a problem.
-------------
PR: https://git.openjdk.org/jdk/pull/12194
More information about the hotspot-gc-dev
mailing list