RFC (round 1), JEP draft: Low-level Object layout introspection methods
Florian Weimer
fw at deneb.enyo.de
Tue Aug 25 17:54:59 UTC 2020
* Remi Forax:
> ----- Mail original -----
>> De: "Florian Weimer" <fw at deneb.enyo.de>
>> À: "Aleksey Shipilev" <shade at redhat.com>
>> Cc: "Brian Goetz" <brian.goetz at oracle.com>, "jdk-dev" <jdk-dev at openjdk.java.net>
>> Envoyé: Dimanche 23 Août 2020 22:37:26
>> Objet: Re: RFC (round 1), JEP draft: Low-level Object layout introspection methods
>
>> * Aleksey Shipilev:
>>
>>> I can see that the JEP can be split in "non-controversial" (sizeOf,
>>> deepSizeOf) and "controversial" (addressOf, fieldOffsetOf)
>>> parts. For the process overhead reasons, I'd push forward with just
>>> one JEP at the moment, though.
>>
>> Are there JVMs out there where naive implementation of deepSizeOf
>> (with something like IdentityHashMap in the background) would itself
>> change object layout and sizes?
>>
>> A theoretical implementation of System.identityHashCode() might
>> allocate a word for the identity hash only after the method has been
>> applied to the object and the object has been moved.
>
> yes, i believe IBM OpenJ9 use/used this exact trick.
> I remember reading a paper about that.
Is this an argument for or against providing an interface like
deepSizeOf? 8-)
More information about the jdk-dev
mailing list