RFR 8231146: Heap object size

Mandy Chung mandy.chung at oracle.com
Thu Sep 19 20:25:28 UTC 2019


I'd avoid adding new methods in sun.misc.Unsafe as we want 
jdk.unsupported ultimately to go away even this one is temporary.

Mandy

On 9/19/19 10:35 AM, Roger Riggs wrote:
> Hi Remi,
>
> In j.u.Objects it will be more likely to be given the challenge it 
> deserves
> to be promoted in the long run.
>
> With inline classes there are lots of different sizes depending on the 
> context,
> inline array elements, embedded in another inline, embedded in a 
> reference type,
> with or without padding,  and depending on compressed oops or not, and 
> other implementation
> specific conditions.  So a single method isn't going to fill the need.
> Regardless, it needs more thought about what it means.
>
> Thanks, Roger
>
> On 9/19/19 12:56 PM, Remi Forax wrote:
>> Hi Roger,
>> why not using sun.misc.Unsafe instead of j.u.Objects ?
>>
>> Rémi
>>
>> ----- Mail original -----
>>> De: "Roger Riggs" <Roger.Riggs at oracle.com>
>>> À: "valhalla-dev" <valhalla-dev at openjdk.java.net>
>>> Envoyé: Mardi 17 Septembre 2019 22:00:57
>>> Objet: RFR 8231146: Heap object size
>>> Please review and comment:
>>>
>>> This request adds a (probably temporary) API to return the heap size of
>>> an object.
>>>
>>> In prototyping with inline classes it will be useful to know an
>>> approximation of the size of an object in the heap while prototyping
>>> various tradoffs in performance and data structures.
>>>
>>>
>>> Webrev:
>>>
>>> http://cr.openjdk.java.net/~rriggs/webrev-object-size-8231146/
>>>
>>> Thanks, Roger
>



More information about the valhalla-dev mailing list