RFR: 8255614: Shenandoah: Consolidate/streamline runtime LRBs [v2]
Roman Kennke
rkennke at openjdk.java.net
Fri Oct 30 13:33:12 UTC 2020
On Fri, 30 Oct 2020 13:05:23 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:
>> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add null-check
>
> src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.inline.hpp line 49:
>
>> 47: bool ShenandoahCollectionSet::is_in_loc(void* p) const {
>> 48: assert(p == NULL || _heap->is_in(p), "Must be in the heap");
>> 49: uintx index = ((uintx) p) >> _region_size_bytes_shift;
>
> Is this right? if heap is not zero-based
Yes. The biased cset-map is allocated such that NULL object maps to a special page that always yields false when checking in_cset(NULL). We use that same technique in JIT-compiled code to avoid explicit NULL-checks.
-------------
PR: https://git.openjdk.java.net/jdk/pull/953
More information about the shenandoah-dev
mailing list