src/share/vm/gc_interface/collectedHeap.cpp

Print this page
rev 6085 : 8036703: incremental: webrev.03 -> webrev.04


  81 GCHeapSummary CollectedHeap::create_heap_summary() {
  82   VirtualSpaceSummary heap_space = create_heap_space_summary();
  83   return GCHeapSummary(heap_space, used());
  84 }
  85 
  86 MetaspaceSummary CollectedHeap::create_metaspace_summary() {
  87   const MetaspaceSizes meta_space(
  88       MetaspaceAux::allocated_capacity_bytes(),
  89       MetaspaceAux::allocated_used_bytes(),
  90       MetaspaceAux::reserved_bytes());
  91   const MetaspaceSizes data_space(
  92       MetaspaceAux::allocated_capacity_bytes(Metaspace::NonClassType),
  93       MetaspaceAux::allocated_used_bytes(Metaspace::NonClassType),
  94       MetaspaceAux::reserved_bytes(Metaspace::NonClassType));
  95   const MetaspaceSizes class_space(
  96       MetaspaceAux::allocated_capacity_bytes(Metaspace::ClassType),
  97       MetaspaceAux::allocated_used_bytes(Metaspace::ClassType),
  98       MetaspaceAux::reserved_bytes(Metaspace::ClassType));
  99 
 100   const MetaspaceChunkFreeListSummary& ms_chunk_free_list_summary =
 101     MetaspaceAux::chunk_free_list_summary(Metaspace::ClassType);
 102   const MetaspaceChunkFreeListSummary& class_chunk_free_list_summary =
 103     MetaspaceAux::chunk_free_list_summary(Metaspace::NonClassType);


 104 
 105   return MetaspaceSummary(MetaspaceGC::capacity_until_GC(), meta_space, data_space, class_space,
 106                           ms_chunk_free_list_summary, class_chunk_free_list_summary);
 107 }
 108 
 109 void CollectedHeap::print_heap_before_gc() {
 110   if (PrintHeapAtGC) {
 111     Universe::print_heap_before_gc();
 112   }
 113   if (_gc_heap_log != NULL) {
 114     _gc_heap_log->log_heap_before();
 115   }
 116 }
 117 
 118 void CollectedHeap::print_heap_after_gc() {
 119   if (PrintHeapAtGC) {
 120     Universe::print_heap_after_gc();
 121   }
 122   if (_gc_heap_log != NULL) {
 123     _gc_heap_log->log_heap_after();




  81 GCHeapSummary CollectedHeap::create_heap_summary() {
  82   VirtualSpaceSummary heap_space = create_heap_space_summary();
  83   return GCHeapSummary(heap_space, used());
  84 }
  85 
  86 MetaspaceSummary CollectedHeap::create_metaspace_summary() {
  87   const MetaspaceSizes meta_space(
  88       MetaspaceAux::allocated_capacity_bytes(),
  89       MetaspaceAux::allocated_used_bytes(),
  90       MetaspaceAux::reserved_bytes());
  91   const MetaspaceSizes data_space(
  92       MetaspaceAux::allocated_capacity_bytes(Metaspace::NonClassType),
  93       MetaspaceAux::allocated_used_bytes(Metaspace::NonClassType),
  94       MetaspaceAux::reserved_bytes(Metaspace::NonClassType));
  95   const MetaspaceSizes class_space(
  96       MetaspaceAux::allocated_capacity_bytes(Metaspace::ClassType),
  97       MetaspaceAux::allocated_used_bytes(Metaspace::ClassType),
  98       MetaspaceAux::reserved_bytes(Metaspace::ClassType));
  99 
 100   const MetaspaceChunkFreeListSummary& ms_chunk_free_list_summary =


 101     MetaspaceAux::chunk_free_list_summary(Metaspace::NonClassType);
 102   const MetaspaceChunkFreeListSummary& class_chunk_free_list_summary =
 103     MetaspaceAux::chunk_free_list_summary(Metaspace::ClassType);
 104 
 105   return MetaspaceSummary(MetaspaceGC::capacity_until_GC(), meta_space, data_space, class_space,
 106                           ms_chunk_free_list_summary, class_chunk_free_list_summary);
 107 }
 108 
 109 void CollectedHeap::print_heap_before_gc() {
 110   if (PrintHeapAtGC) {
 111     Universe::print_heap_before_gc();
 112   }
 113   if (_gc_heap_log != NULL) {
 114     _gc_heap_log->log_heap_before();
 115   }
 116 }
 117 
 118 void CollectedHeap::print_heap_after_gc() {
 119   if (PrintHeapAtGC) {
 120     Universe::print_heap_after_gc();
 121   }
 122   if (_gc_heap_log != NULL) {
 123     _gc_heap_log->log_heap_after();