RFR: 8353115: GenShen: mixed evacuation candidate regions need accurate live_data [v2]
Kelvin Nilsen
kdnilsen at openjdk.org
Wed Apr 9 18:18:27 UTC 2025
On Wed, 9 Apr 2025 18:01:03 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:
>> It does look simpler. Do you have an example of one of the failing asserts?
>>
>> One thing I hadn't considered is how "hot" `ShenandoahHeapRegion::get_live_data_words` is. Is there going to be a significant performance hit if we make this method do more work? It does look like this method is called frequently.
>
> 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...
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24319#discussion_r2035888970
More information about the shenandoah-dev
mailing list