Mercurial > hg > truffle
diff src/share/vm/memory/metaspace.hpp @ 6730:5d2156bcb78b
7195789: NPG: assert(used + free == capacity) failed: Accounting is wrong
Reviewed-by: coleenp, jcoomes
author | jmasa |
---|---|
date | Tue, 04 Sep 2012 16:20:28 -0700 |
parents | da91efe96a93 |
children | 942bb29b20b0 |
line wrap: on
line diff
--- a/src/share/vm/memory/metaspace.hpp Tue Sep 04 18:01:20 2012 -0700 +++ b/src/share/vm/memory/metaspace.hpp Tue Sep 04 16:20:28 2012 -0700 @@ -149,6 +149,10 @@ // Statistics for class space and data space in metaspace. static size_t used_in_bytes(Metaspace::MetadataType mdtype); + // Same as used_in_bytes() without the consistency checking. + // Use this version if not at a safepoint (so consistency is + // not necessarily expected). + static size_t used_in_bytes_unsafe(Metaspace::MetadataType mdtype); static size_t free_in_bytes(Metaspace::MetadataType mdtype); static size_t capacity_in_bytes(Metaspace::MetadataType mdtype); static size_t reserved_in_bytes(Metaspace::MetadataType mdtype); @@ -163,6 +167,11 @@ used_in_bytes(Metaspace::NonClassType); } + static size_t used_in_bytes_unsafe() { + return used_in_bytes_unsafe(Metaspace::ClassType) + + used_in_bytes_unsafe(Metaspace::NonClassType); + } + // Total of available space in all Metaspaces // Total of capacity allocated to all Metaspaces. This includes // space in Metachunks not yet allocated and in the Metachunk