RFR: 8294842: Pass actual pending cards to G1Policy::update_young_length_bounds during young gen revise [v2]

Kim Barrett kbarrett at openjdk.org
Thu Oct 13 05:17:07 UTC 2022


On Wed, 12 Oct 2022 07:26:11 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> src/hotspot/share/gc/g1/g1Policy.cpp line 198:
>> 
>>> 196: void G1Policy::update_young_length_bounds() {
>>> 197:   // We have no measure of the number of pending cards in the thread buffers,
>>> 198:   // assume these are very few.
>> 
>> `predict_pending_cards()` includes the cards that were thread buffers.  It is based on the cards that were processed, which is done after DCQS::concatenate_logs.
>
> Looking at the code:
> `G1Policy::record_concurrent_refinement_stats` sets `_pending_cards_at_gc_start = dcqs.num_cards()`; `record_concurrent_refinement_stats` is called in `G1Policy::record_young_collection_start`; in `G1YoungCollector::collect`, `record_young_collection_start` is called _before_ `pre_evacuate_collection_set` which calls `G1BarrierSet::dirty_card_queue_set().concatenate_logs`.
> 
> I seem to be missing something, can you clarify?

That's a bug.  I even found and fixed it in some earlier version of my concurrent refinement changes.  But it looks like I never extracted it out or even created a bug report for it, and there's no fix for it in my concurrent refinement PR. Drat!

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

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



More information about the hotspot-gc-dev mailing list