RFR: 8295319: pending_cards_at_gc_start doesn't include cards in thread buffers
Kim Barrett
kbarrett at openjdk.org
Mon Oct 31 17:06:04 UTC 2022
On Mon, 31 Oct 2022 08:31:13 GMT, Ivan Walulya <iwalulya at openjdk.org> wrote:
> `calculate_collection_set` -> `finalize_initial_collection_set` -> `finalize_young_part`: `size_t pending_cards = _policy->pending_cards_at_gc_start() + _g1h->hot_card_cache()->num_entries();`
>
> called before `pre_evacuate_collection_set`
>
> `flush_dirty_card_logs_and_stats` needs to be called before `calculate_collection_set`
Sigh! Looks like I got lost while tracking down the callers and call chains.
So the use in `finalize_young_part` is presumably using the pending cards count from the previous
collection, which usually isn't such a bad value that it causes anything goes off the rails, so testing
didn't spot a problem.
I kind of hate some of that code, which has too many non-obvious and unchecked (and not easily
checked) ordering constraints.
Thanks for spotting this.
-------------
PR: https://git.openjdk.org/jdk/pull/10914
More information about the hotspot-gc-dev
mailing list