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

Yumin Qi minqi at openjdk.java.net
Wed Oct 14 03:31:13 UTC 2020


On Wed, 14 Oct 2020 01:07:30 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> 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?

MetaspaceSnapshot predefine the _reserved_in_bytes (and other two, _commited_in_byte, _used_in_bytes) with dimension of
MetadataTypeCount, the array of index ClassType is a valid slot. In this bug, if CCP is disabled, the snapshot for
ClassType gets updated with zero, but non class type data is not update in snapshot. There is no output for class type
data when CCP is disabled. While the original data recording is correct (at allocation) the snapshot did not get it. I
will do some tests.

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

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


More information about the hotspot-runtime-dev mailing list