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

Thomas Stuefe stuefe at openjdk.org
Thu Aug 29 05:28:21 UTC 2024


On Wed, 28 Aug 2024 15:42:57 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 two additional commits since the last revision:
> 
>  - Merge branch 'anon' of github.com:coleenp/jdk into anon
>  - Fix copyright

src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdKlassQueue.cpp line 79:

> 77: 
> 78: static bool can_compress_element(const Klass* klass) {
> 79:   return Metaspace::is_in_class_space(klass) &&

Suggestion:

  return (Metaspace::is_in_class_space(klass) || Metaspace::is_in_shared_metaspace(klass)) &&

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19157#discussion_r1735585478


More information about the core-libs-dev mailing list