comparison src/share/vm/memory/metaspace.hpp @ 6734:942bb29b20b0

7196298: Better fix for 7195789 Reviewed-by: jcoomes, brutisso
author jmasa
date Thu, 06 Sep 2012 07:28:30 -0700
parents 5d2156bcb78b
children 8da5e203b993
comparison
equal deleted inserted replaced
6733:fa6e618671d7 6734:942bb29b20b0
147 147
148 class MetaspaceAux : AllStatic { 148 class MetaspaceAux : AllStatic {
149 149
150 // Statistics for class space and data space in metaspace. 150 // Statistics for class space and data space in metaspace.
151 static size_t used_in_bytes(Metaspace::MetadataType mdtype); 151 static size_t used_in_bytes(Metaspace::MetadataType mdtype);
152 // Same as used_in_bytes() without the consistency checking.
153 // Use this version if not at a safepoint (so consistency is
154 // not necessarily expected).
155 static size_t used_in_bytes_unsafe(Metaspace::MetadataType mdtype);
156 static size_t free_in_bytes(Metaspace::MetadataType mdtype); 152 static size_t free_in_bytes(Metaspace::MetadataType mdtype);
157 static size_t capacity_in_bytes(Metaspace::MetadataType mdtype); 153 static size_t capacity_in_bytes(Metaspace::MetadataType mdtype);
158 static size_t reserved_in_bytes(Metaspace::MetadataType mdtype); 154 static size_t reserved_in_bytes(Metaspace::MetadataType mdtype);
159 155
160 static size_t free_chunks_total(Metaspace::MetadataType mdtype); 156 static size_t free_chunks_total(Metaspace::MetadataType mdtype);
163 public: 159 public:
164 // Total of space allocated to metadata in all Metaspaces 160 // Total of space allocated to metadata in all Metaspaces
165 static size_t used_in_bytes() { 161 static size_t used_in_bytes() {
166 return used_in_bytes(Metaspace::ClassType) + 162 return used_in_bytes(Metaspace::ClassType) +
167 used_in_bytes(Metaspace::NonClassType); 163 used_in_bytes(Metaspace::NonClassType);
168 }
169
170 static size_t used_in_bytes_unsafe() {
171 return used_in_bytes_unsafe(Metaspace::ClassType) +
172 used_in_bytes_unsafe(Metaspace::NonClassType);
173 } 164 }
174 165
175 // Total of available space in all Metaspaces 166 // Total of available space in all Metaspaces
176 // Total of capacity allocated to all Metaspaces. This includes 167 // Total of capacity allocated to all Metaspaces. This includes
177 // space in Metachunks not yet allocated and in the Metachunk 168 // space in Metachunks not yet allocated and in the Metachunk