RFR: Add generations to freeset [v5]

Kelvin Nilsen kdnilsen at openjdk.org
Tue Apr 18 21:06:50 UTC 2023


On Thu, 13 Apr 2023 11:04:23 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp line 65:
>> 
>>> 63:   assert (idx < _max, "index is sane: " SIZE_FORMAT " < " SIZE_FORMAT " (left: " SIZE_FORMAT ", right: " SIZE_FORMAT ")",
>>> 64:           idx, _max, _mutator_leftmost, _mutator_rightmost);
>>> 65:   assert(!_mutator_free_bitmap.at(idx) || (alloc_capacity(ShenandoahHeap::heap()->get_region(idx)) > 0),
>> 
>> Things like `(alloc_capacity(ShenandoahHeap::heap()->get_region(idx)) > 0)` are used often here, might just use a separate method for it.
>
> Also, for the benefit of fastdebug builds performance (= faster testing), this can be something like:
> 
> 
> bool is_free = _mutator_free_bitmap.at(idx);
> assert(!is_free || has_alloc_capacity(idx), "Mutator free set should contain useful regions");
> return is_free;

done.

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/250#discussion_r1170568393


More information about the shenandoah-dev mailing list