RFR: 8338526: Don't store abstract and interface Klasses in class metaspace
Roman Kennke
rkennke at openjdk.org
Thu Aug 22 07:57:11 UTC 2024
On Thu, 9 May 2024 13:51:09 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.
If I understand correctly, we already have limits on how many classes we can represent as compressed class-pointers. While this is nice for Lilliput, this is equally useful for non-Lilliput CCP, because addressable class-space doesn't get polluted by classes that never need to be encoded as CCP, and thus effectively increases the number of classes that we can address without resorting to -UseCompressedClassPointers.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19157#issuecomment-2304017272
More information about the core-libs-dev
mailing list