[master] RFR: Smaller class pointers [v2]

Ioi Lam iklam at openjdk.java.net
Tue Dec 7 16:26:43 UTC 2021


On Tue, 7 Dec 2021 13:46:53 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> src/hotspot/share/cds/archiveBuilder.cpp line 222:
>>
>>> 220:     }
>>> 221:     // See RunTimeClassInfo::get_for()
>>> 222:     _estimated_metaspaceobj_bytes += align_up(BytesPerWord, KlassAlignmentInBytes);
>>
>> Small nit here: The original code was intended to reserve space for an extra pointer that's placed immediately below each Klass. I think we should do this so that the intention is clear.
>>
>>
>> // Reserve a slot to store a RunTimeClassInfo pointer immediately below each Klass.
>> // See RunTimeClassInfo::get_for()
>> _estimated_metaspaceobj_bytes += BytesPerWord;
>> // Extra padding for make sure each Klass is aligned.
>> _estimated_metaspaceobj_bytes += KlassAlignmentInBytes;
>
> Okay, I fixed it and modified the comments in both gather_klass_and_symbol and make_shallow_copy to be clearer to non-CDS people. Could you take a look at them?

New version looks good.

-------------

PR: https://git.openjdk.java.net/lilliput/pull/13



More information about the lilliput-dev mailing list