< prev index next >

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

Print this page




 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);




 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 = 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);


< prev index next >