RFR: Fix budgeting assertion [v2]

Kelvin Nilsen kdnilsen at openjdk.org
Sat Aug 13 00:18:09 UTC 2022


On Wed, 10 Aug 2022 16:52:33 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

>> Kelvin Nilsen has updated the pull request incrementally with three additional commits since the last revision:
>> 
>>  - Remove instrumentation
>>  - Fix choose_collection_set to use region->index after quicksort
>>    
>>    After region data is sorted in garbage order, index within the region
>>    data array no longer matches the region->index().  Use the
>>    region->index() to test whether the region was pre-selected rather than
>>    using the index within the region data array.  Very confusing that this
>>    code ever worked.  Perhaps this bug was introduced by some sort of merge
>>    conflict.
>>  - Assure that aged young regions are not promoted if not pre-selected
>>    
>>    In the case that an aged young region is not pre-selected, it should not
>>    be included in the collection set because there is not enough room in
>>    old-gen to hold its promoted contents.
>
> src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.cpp line 126:
> 
>> 124:             old_cur_cset = new_cset;
>> 125:           }
>> 126:         } else if (cset->is_preselected(r->index())) {
> 
> It might be a good idea for all the `choose_collection_set*` methods that use `is_preselected` to assert that cset's `_preselected_regions` isn't null, perhaps via an `is_preselected_established` (or appropriately named assert_only method that asserts that `_preselected_regions != NULL`

Thanks.  This is a good idea.  Let's put this into a future pr...

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

PR: https://git.openjdk.org/shenandoah/pull/156


More information about the shenandoah-dev mailing list