RFR: 8337981: ShenandoahHeap::is_in should check for alive regions [v2]
Aleksey Shipilev
shade at openjdk.org
Wed Aug 14 16:37:51 UTC 2024
On Tue, 13 Aug 2024 17:50:45 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
>> Aleksey Shipilev has updated the pull request incrementally with three additional commits since the last revision:
>>
>> - Style touchups
>> - Fixing ShenandoahReferenceProcessor
>> - Verifier fix
>
> src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 748:
>
>> 746: }
>> 747:
>> 748: bool ShenandoahHeap::is_in_bounds(const void* p) const {
>
> Is this the same as is_in_reserved()? Do we even need that new method?
Right, we can use `is_in_reserved` instead. In fact, our current method that computes this from the region sizes is not necessary, as the heap regions cover the heap exactly. So we can just as for `is_in_reserved` everywhere, without any loss. Gonna massage the code a bit around this.
> src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 759:
>
>> 757: // objects during Full GC across the regions in not yet determinate state.
>> 758: return is_full_gc_move_in_progress() ||
>> 759: heap_region_containing(p)->is_active();
>
> Should this also check against the region bounds?
Not sure I understand. The if-condition checks that we are pointing into heap. This means `heap_region_containing` always returns the region.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20492#discussion_r1717241078
PR Review Comment: https://git.openjdk.org/jdk/pull/20492#discussion_r1717242093
More information about the shenandoah-dev
mailing list