RFR: 8229027: Improve how JNIHandleBlock::oops_do distinguishes oops from non-oops
dean.long at oracle.com
dean.long at oracle.com
Wed Aug 7 05:30:04 UTC 2019
Hi Erik. Doesn't this only work if sizeof (class oop) <= sizeof
(uintptr_t)? If a compiler uses more space for class oop, or we add a
debug field, then it will break. Wouldn't a union be safer?
dl
On 8/6/19 6:04 AM, Erik Österlund wrote:
> Hi,
>
> In JNIHandleBlock::oops_do(), the blocks may contain free list next
> pointers or oops. The distinction is detected by asking the
> CollectedHeap if the pointer value is in the heap reserve or not.
> This forces GCs to have one single contiguous heap reservation,
> without holes in it, which seems like an unnecessary restriction (and
> effectively blocks a ZGC mac port).
>
> This patch removes this reliance by tagging the free list next
> pointers instead, allowing the distinction between oops and freelist
> pointers based on the low order bit value.
>
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8229027
>
> Webrev:
> http://cr.openjdk.java.net/~eosterlund/8229027/webrev.00/
>
>
> Thanks,
> /Erik
More information about the hotspot-runtime-dev
mailing list