RFR: 8365823: Revert storing abstract and interface Klasses to non-class metaspace [v3]

Thomas Stuefe stuefe at openjdk.org
Thu Sep 18 14:29:41 UTC 2025


On Mon, 15 Sep 2025 14:38:03 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> This change removes the optimization to not store abstract and interface Klass metadata to non-class metaspace.  Now all Klass metadata is in the Klass metaspace.  This is simpler and less bug prone, and didn't help with the limitation of classes that can be stored in class metaspace materially.
>> Tested with tier1-4.
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Remove CFP.is_abstract().

This looks good. In hindsight kind of scary that there are no tests to change back. But all Metaspace tests sit either on a layer below Metaspace::allocate or test class loading, which sits above this layer.

Some tests that check expected memory levels in class space and non-class metaspace could now run into problems, since the ratio between these numbers should shift (total consumption should be about identical). Maybe not. We'll see it when we see it.

src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotMetaspaceConstantImpl.java line 102:

> 100:             // in compressible metaspace.
> 101:             return !t.isInterface() && !t.isAbstract();
> 102:         }

Can we remove this completely?

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

Marked as reviewed by stuefe (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/27295#pullrequestreview-3240079100
PR Review Comment: https://git.openjdk.org/jdk/pull/27295#discussion_r2359574924


More information about the graal-dev mailing list