< prev index next >

src/hotspot/share/gc/shared/collectedHeap.cpp

Print this page




 105       MetaspaceUtils::used_bytes(),
 106       MetaspaceUtils::reserved_bytes());
 107   const MetaspaceSizes data_space(
 108       MetaspaceUtils::committed_bytes(Metaspace::NonClassType),
 109       MetaspaceUtils::used_bytes(Metaspace::NonClassType),
 110       MetaspaceUtils::reserved_bytes(Metaspace::NonClassType));
 111   const MetaspaceSizes class_space(
 112       MetaspaceUtils::committed_bytes(Metaspace::ClassType),
 113       MetaspaceUtils::used_bytes(Metaspace::ClassType),
 114       MetaspaceUtils::reserved_bytes(Metaspace::ClassType));
 115 
 116   const MetaspaceChunkFreeListSummary& ms_chunk_free_list_summary =
 117     MetaspaceUtils::chunk_free_list_summary(Metaspace::NonClassType);
 118   const MetaspaceChunkFreeListSummary& class_chunk_free_list_summary =
 119     MetaspaceUtils::chunk_free_list_summary(Metaspace::ClassType);
 120 
 121   return MetaspaceSummary(MetaspaceGC::capacity_until_GC(), meta_space, data_space, class_space,
 122                           ms_chunk_free_list_summary, class_chunk_free_list_summary);
 123 }
 124 











 125 void CollectedHeap::print_heap_before_gc() {
 126   Universe::print_heap_before_gc();
 127   if (_gc_heap_log != NULL) {
 128     _gc_heap_log->log_heap_before(this);
 129   }
 130 }
 131 
 132 void CollectedHeap::print_heap_after_gc() {
 133   Universe::print_heap_after_gc();
 134   if (_gc_heap_log != NULL) {
 135     _gc_heap_log->log_heap_after(this);
 136   }
 137 }
 138 
 139 void CollectedHeap::print() const { print_on(tty); }
 140 
 141 void CollectedHeap::print_on_error(outputStream* st) const {
 142   st->print_cr("Heap:");
 143   print_extended_on(st);
 144   st->cr();




 105       MetaspaceUtils::used_bytes(),
 106       MetaspaceUtils::reserved_bytes());
 107   const MetaspaceSizes data_space(
 108       MetaspaceUtils::committed_bytes(Metaspace::NonClassType),
 109       MetaspaceUtils::used_bytes(Metaspace::NonClassType),
 110       MetaspaceUtils::reserved_bytes(Metaspace::NonClassType));
 111   const MetaspaceSizes class_space(
 112       MetaspaceUtils::committed_bytes(Metaspace::ClassType),
 113       MetaspaceUtils::used_bytes(Metaspace::ClassType),
 114       MetaspaceUtils::reserved_bytes(Metaspace::ClassType));
 115 
 116   const MetaspaceChunkFreeListSummary& ms_chunk_free_list_summary =
 117     MetaspaceUtils::chunk_free_list_summary(Metaspace::NonClassType);
 118   const MetaspaceChunkFreeListSummary& class_chunk_free_list_summary =
 119     MetaspaceUtils::chunk_free_list_summary(Metaspace::ClassType);
 120 
 121   return MetaspaceSummary(MetaspaceGC::capacity_until_GC(), meta_space, data_space, class_space,
 122                           ms_chunk_free_list_summary, class_chunk_free_list_summary);
 123 }
 124 
 125 void CollectedHeap::run_task_at_safepoint(AbstractGangTask* task, uint num_workers) {
 126   WorkGang* gang = get_safepoint_workers();
 127   if (gang == NULL) {
 128     // GC doesn't support parallel worker threads.
 129     // Execute in this thread with worker id 0.
 130     task->work(0);
 131   } else {
 132     gang->run_task(task, num_workers);
 133   }
 134 }
 135 
 136 void CollectedHeap::print_heap_before_gc() {
 137   Universe::print_heap_before_gc();
 138   if (_gc_heap_log != NULL) {
 139     _gc_heap_log->log_heap_before(this);
 140   }
 141 }
 142 
 143 void CollectedHeap::print_heap_after_gc() {
 144   Universe::print_heap_after_gc();
 145   if (_gc_heap_log != NULL) {
 146     _gc_heap_log->log_heap_after(this);
 147   }
 148 }
 149 
 150 void CollectedHeap::print() const { print_on(tty); }
 151 
 152 void CollectedHeap::print_on_error(outputStream* st) const {
 153   st->print_cr("Heap:");
 154   print_extended_on(st);
 155   st->cr();


< prev index next >