RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v2]

Thomas Stuefe stuefe at openjdk.org
Sat Aug 24 10:56:06 UTC 2024


On Fri, 23 Aug 2024 20:46:39 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> This change stores InstanceKlass for interface and abstract classes in the non-class metaspace, since class metaspace will have limits on number of classes that can be represented when Lilliput changes go in.  Classes that have no instances created for them don't require compressed class pointers.  The generated LambdaForm classes are also AllStatic, and changing them to abstract moves them to non-class metaspace too.  It's not technically great to make them abstract and not final but you can't have both.  Java classfile access flags have no way of specifying something like AllStatic.
>> 
>> Tested with tier1-8.
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Incorporated a set of Thomas Stuefe's comments. Take out AbstractClass MetaspaceObj::Type.

> I renamed this is_in_class_space() with the lower case 'c'. It's still directing metaspace or indicating where the object was allocated. Your name is a little better but I think not enough until we want to expand the things we want allocated in the class space. As we talked about, with Tiny Class Pointers, class space will have different things in it (not that these new things need a compressed pointers). But I think we're better off having less things in the space where their pointers can be compressed since this space is constrained.


How about "needs_class_space" then?

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

PR Comment: https://git.openjdk.org/jdk/pull/19157#issuecomment-2308353198


More information about the core-libs-dev mailing list