RFR: 8254012: NMT: MetaspaceSnapshot::snapshot uses wrong enum

Ioi Lam iklam at openjdk.java.net
Wed Oct 14 01:10:11 UTC 2020


On Tue, 13 Oct 2020 23:40:54 GMT, Yumin Qi <minqi at openjdk.org> wrote:

> Please review this simple change.
> Snapshot should be done first on NonClassType which will include ClassType allocation when
> Metaspace::using_class_space() is false.  _class_vsm (a VirtualSpaceManager) is set only for class type allocation when
> using_class_space is true. The correct order is do snapshot for NonClassType first, then for ClassType if
> using_class_space.  Tests: mach5 tier1-4 in progress.

I wonder why this bug has not been discovered until now. It seems like the old code would not work at all when
compressed class space is disabled. Do we have any test cases for it? Or, is this feature actually used?

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

PR: https://git.openjdk.java.net/jdk/pull/645


More information about the hotspot-runtime-dev mailing list