372 return committed_bytes(Metaspace::ClassType) +
373 committed_bytes(Metaspace::NonClassType);
374 }
375
376 static size_t min_chunk_size_words();
377 static size_t min_chunk_size_bytes() {
378 return min_chunk_size_words() * BytesPerWord;
379 }
380
381 // Flags for print_report().
382 enum ReportFlag {
383 // Show usage by class loader.
384 rf_show_loaders = (1 << 0),
385 // Breaks report down by chunk type (small, medium, ...).
386 rf_break_down_by_chunktype = (1 << 1),
387 // Breaks report down by space type (anonymous, reflection, ...).
388 rf_break_down_by_spacetype = (1 << 2),
389 // Print details about the underlying virtual spaces.
390 rf_show_vslist = (1 << 3),
391 // Print metaspace map.
392 rf_show_vsmap = (1 << 4)
393 };
394
395 // This will print out a basic metaspace usage report but
396 // unlike print_report() is guaranteed not to lock or to walk the CLDG.
397 static void print_basic_report(outputStream* st, size_t scale);
398
399 // Prints a report about the current metaspace state.
400 // Optional parts can be enabled via flags.
401 // Function will walk the CLDG and will lock the expand lock; if that is not
402 // convenient, use print_basic_report() instead.
403 static void print_report(outputStream* out, size_t scale = 0, int flags = 0);
404
405 static bool has_chunk_free_list(Metaspace::MetadataType mdtype);
406 static MetaspaceChunkFreeListSummary chunk_free_list_summary(Metaspace::MetadataType mdtype);
407
408 // Print change in used metadata.
409 static void print_metaspace_change(size_t prev_metadata_used);
410 static void print_on(outputStream * out);
411
412 // Prints an ASCII representation of the given space.
|
372 return committed_bytes(Metaspace::ClassType) +
373 committed_bytes(Metaspace::NonClassType);
374 }
375
376 static size_t min_chunk_size_words();
377 static size_t min_chunk_size_bytes() {
378 return min_chunk_size_words() * BytesPerWord;
379 }
380
381 // Flags for print_report().
382 enum ReportFlag {
383 // Show usage by class loader.
384 rf_show_loaders = (1 << 0),
385 // Breaks report down by chunk type (small, medium, ...).
386 rf_break_down_by_chunktype = (1 << 1),
387 // Breaks report down by space type (anonymous, reflection, ...).
388 rf_break_down_by_spacetype = (1 << 2),
389 // Print details about the underlying virtual spaces.
390 rf_show_vslist = (1 << 3),
391 // Print metaspace map.
392 rf_show_vsmap = (1 << 4),
393 // If show_loaders: show loaded classes for each loader.
394 rf_show_classes = (1 << 5)
395 };
396
397 // This will print out a basic metaspace usage report but
398 // unlike print_report() is guaranteed not to lock or to walk the CLDG.
399 static void print_basic_report(outputStream* st, size_t scale);
400
401 // Prints a report about the current metaspace state.
402 // Optional parts can be enabled via flags.
403 // Function will walk the CLDG and will lock the expand lock; if that is not
404 // convenient, use print_basic_report() instead.
405 static void print_report(outputStream* out, size_t scale = 0, int flags = 0);
406
407 static bool has_chunk_free_list(Metaspace::MetadataType mdtype);
408 static MetaspaceChunkFreeListSummary chunk_free_list_summary(Metaspace::MetadataType mdtype);
409
410 // Print change in used metadata.
411 static void print_metaspace_change(size_t prev_metadata_used);
412 static void print_on(outputStream * out);
413
414 // Prints an ASCII representation of the given space.
|