MetaspaceSize (the setting determining the initial threshold to start off a metaspace-motivated GC) is both platform- and compiler-tier-dependent.
In addition to that, it gets modified after Metaspace::ergo_initialize() ran and had its say on metaspace settings, in the compiler initialization:
https://github.com/openjdk/jdk/blob/2b00367e1154feb2c05b84a11d62fb5750e46acf/src/hotspot/share/compiler/compilerDefinitions.cpp#L194-L196
which causes confusion and test errors like these:JDK-8261907 , JDK-8261907
The reasons for this are not perfectly clear and seem to originate from PermGen times:
https://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2021-February/045536.html
Re-check if these dependencies are still needed post JEP-387. At least the platform dependencies don't seem to be useful. Compiler-dependencies may be useful since the number of MethodCounters (which live in Metaspace) are dependend on compiler tier.
In addition to that, it gets modified after Metaspace::ergo_initialize() ran and had its say on metaspace settings, in the compiler initialization:
https://github.com/openjdk/jdk/blob/2b00367e1154feb2c05b84a11d62fb5750e46acf/src/hotspot/share/compiler/compilerDefinitions.cpp#L194-L196
which causes confusion and test errors like these:
The reasons for this are not perfectly clear and seem to originate from PermGen times:
https://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2021-February/045536.html
Re-check if these dependencies are still needed post JEP-387. At least the platform dependencies don't seem to be useful. Compiler-dependencies may be useful since the number of MethodCounters (which live in Metaspace) are dependend on compiler tier.