RFR: 8353115: GenShen: mixed evacuation candidate regions need accurate live_data [v2]

Kelvin Nilsen kdnilsen at openjdk.org
Wed Apr 9 18:24:36 UTC 2025


On Wed, 9 Apr 2025 18:15:38 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> Examples:
>>   FullGC worker:
>>    void ShenandoahMCResestCompleteBitmapTask::work(uint worker_id) {
>>     ShenandoahParallelWorkerSession worker_session(worker_id);
>>     ShenandoahHeapRegion* region = _regions.next();
>>     ShenandoahHeap* heap = ShenandoahHeap::heap();
>>     ShenandoahMarkingContext* const ctx = heap->complete_marking_context();
>>     while (region != nullptr) {
>>       if (heap->is_bitmap_slice_committed(region) && !region->is_pinned() && region->has_marked()) {
>>         //  kelvin replacing has_live() with new method has_marked() because has_live() calls get_live_data_words()
>>         //  and pointer_delta() asserts out because TAMS is not less than top().  has_marked() does what has_live()
>>         //  used to do...
>>         ctx->clear_bitmap(region);
>>       }
>>       region = _regions.next();
>>     }
>>   }
>> 
>> ShenandoahInitMarkUpdateRegionStateClosure::heap_region_do() {
>> -    assert(!r->has_live(), "Region %zu should have no live data", r->index());
>> +    assert(!r->has_marked(), "Region %zu should have no marked data", r->index());
>
> Not sure about performance impact, other than implementing and testing...

i suspect performance impact is minimal.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24319#discussion_r2035896982


More information about the hotspot-gc-dev mailing list