218 // Free empty virtualspaces
219 static void purge(MetadataType mdtype);
220 static void purge();
221
222 void print_on(outputStream* st) const;
223 // Debugging support
224 void verify();
225
226 class AllocRecordClosure : public StackObj {
227 public:
228 virtual void doit(address ptr, MetaspaceObj::Type type, int byte_size) = 0;
229 };
230
231 void iterate(AllocRecordClosure *closure);
232
233 // Return TRUE only if UseCompressedClassPointers is True and DumpSharedSpaces is False.
234 static bool using_class_space() {
235 return NOT_LP64(false) LP64_ONLY(UseCompressedClassPointers && !DumpSharedSpaces);
236 }
237
238 };
239
240 class MetaspaceAux : AllStatic {
241 static size_t free_chunks_total_words(Metaspace::MetadataType mdtype);
242
243 // These methods iterate over the classloader data graph
244 // for the given Metaspace type. These are slow.
245 static size_t used_bytes_slow(Metaspace::MetadataType mdtype);
246 static size_t free_bytes_slow(Metaspace::MetadataType mdtype);
247 static size_t capacity_bytes_slow(Metaspace::MetadataType mdtype);
248 static size_t capacity_bytes_slow();
249
250 // Running sum of space in all Metachunks that has been
251 // allocated to a Metaspace. This is used instead of
252 // iterating over all the classloaders. One for each
253 // type of Metadata
254 static size_t _allocated_capacity_words[Metaspace:: MetadataTypeCount];
255 // Running sum of space in all Metachunks that have
256 // are being used for metadata. One for each
257 // type of Metadata.
|
218 // Free empty virtualspaces
219 static void purge(MetadataType mdtype);
220 static void purge();
221
222 void print_on(outputStream* st) const;
223 // Debugging support
224 void verify();
225
226 class AllocRecordClosure : public StackObj {
227 public:
228 virtual void doit(address ptr, MetaspaceObj::Type type, int byte_size) = 0;
229 };
230
231 void iterate(AllocRecordClosure *closure);
232
233 // Return TRUE only if UseCompressedClassPointers is True and DumpSharedSpaces is False.
234 static bool using_class_space() {
235 return NOT_LP64(false) LP64_ONLY(UseCompressedClassPointers && !DumpSharedSpaces);
236 }
237
238 static bool is_class_space_allocation(MetadataType mdType) {
239 return mdType == ClassType && using_class_space();
240 }
241 };
242
243 class MetaspaceAux : AllStatic {
244 static size_t free_chunks_total_words(Metaspace::MetadataType mdtype);
245
246 // These methods iterate over the classloader data graph
247 // for the given Metaspace type. These are slow.
248 static size_t used_bytes_slow(Metaspace::MetadataType mdtype);
249 static size_t free_bytes_slow(Metaspace::MetadataType mdtype);
250 static size_t capacity_bytes_slow(Metaspace::MetadataType mdtype);
251 static size_t capacity_bytes_slow();
252
253 // Running sum of space in all Metachunks that has been
254 // allocated to a Metaspace. This is used instead of
255 // iterating over all the classloaders. One for each
256 // type of Metadata
257 static size_t _allocated_capacity_words[Metaspace:: MetadataTypeCount];
258 // Running sum of space in all Metachunks that have
259 // are being used for metadata. One for each
260 // type of Metadata.
|