On Fri, 27 May 2022 06:22:36 GMT, Ioi Lam <ik...@openjdk.org> wrote: > > The basic problem is that we have two non-heap pools: > > > > * `MetaspacePool` > > > > * consists of `ClassType` and `NonClassType` parts > > * `CompressedKlassSpacePool` > > > > but the `CompressedKlassSpacePool` is actually the "ClassType" part of the > > `MetaspacePool`! > > I think the right fix is to just convert the `MetaspacePool` into > > `NonClassMetaspacePool` and only report the non-class values. > > AFAICS this will only be visible via the MXBean. > > When CDS is enabled, the CompressedKlassSpacePool actually contains more than > Klass objects. It can contain other metadata such as Method, ConstantPool, > etc. So calling these pools "class" and "non-class" is not 100% correct. > > Is there any reason for separating the CompressedKlassSpacePool from other > metadata? I know in the past it was possible to run out of spaces in > CompressedKlassSpace, so there might be a reason to monitor it separately?
Yes, you can run out of Class space separately from Metaspace. ------------- PR: https://git.openjdk.java.net/jdk/pull/8831