RFR (XS): 8005108: NPG: Add specialized Metachunk sizes for reflection and anonymous classloaders
stefan.karlsson at oracle.com
Tue Dec 18 10:02:54 UTC 2012
Description from the bug:
The implementation of MetaspaceAux::used_in_bytes(), capacity_in_bytes()
and reserved_in_bytes() changed as part of this changeset:
date: Thu Nov 29 16:50:29 2012 -0500
summary: 8000662: NPG: nashorn ant clean test262 out-of-memory with Java
Before this change it seems like data + classes = total. After this does
not seem to hold.
This can be verified by running a simple test that does System.gc() with
Metaspace total 3400K, used 2760K, reserved 108544K
data space 3076K, used 2477K, reserved 6144K
class space 324K, used 283K, reserved 102400
Metaspace total 3400K, used 3400K, reserved 108544K
data space 3076K, used 2476K, reserved 6144K
class space 324K, used 283K, reserved 102400K
In this example capacity and reserved add up, but used does not. I have
seen cases where at least capacity also did not add up.
This patch reverts back to the old implementation. We probably want a
better way to count these values, but right now we need consistent numbers.
More information about the hotspot-gc-dev