RFR: JDK-8211270: GC abstraction to get real object and headers size

Roman Kennke rkennke at redhat.com
Tue Oct 9 14:39:21 UTC 2018


Hey Aleksey,

> On 10/05/2018 06:20 PM, Roman Kennke wrote:
>>> Webrev:
>>> http://cr.openjdk.java.net/~rkennke/JDK-8211270/webrev.00/
> 
> Do we really need the abstractions for header sizes? I think all usages need the object size, and
> header sizes can be just picked up from the usual places. No GC, including Shenandoah is changing
> the header size?
> 
> Trying to understand the use case, looking at Shenandoah's diff here:
> 
> https://builds.shipilev.net/patch-openjdk-shenandoah-jdk/latest/src/hotspot/share/gc/shared/plab.cpp.sdiff.html
> 
> ...it seems what we really want is to mix in oop_extra_words into plab.cpp accessors. Because doing
> ShenandoahHeap::obj_header_size() { return obj_header_size + oop_extra_words; } seems wrong down the
> line -- it would _not_ be the header size.

It seems that the PLAB stuff does indeed require a different kind of
abstraction, and most likely something that can be shared with, e.g.,
TLAB in the form of a virtual version of CollectedHeap::min_fill_size()
or such. Let's take this part out of the patch:

http://cr.openjdk.java.net/~rkennke/JDK-8211270/webrev.01/

Good now?

Roman

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20181009/37719558/signature.asc>


More information about the hotspot-gc-dev mailing list