Mercurial > hg > truffle
comparison src/share/vm/gc_interface/collectedHeap.cpp @ 17771:9fdaa79b0c27
8036703: Add trace event with statistics for the metaspace chunk free lists
Reviewed-by: stefank, mgerdin, coleenp, egahlin
author | ehelin |
---|---|
date | Fri, 21 Mar 2014 10:31:51 +0100 |
parents | 537c8e21b118 |
children | fa21c9537e6e |
comparison
equal
deleted
inserted
replaced
17770:5af31f70a866 | 17771:9fdaa79b0c27 |
---|---|
95 const MetaspaceSizes class_space( | 95 const MetaspaceSizes class_space( |
96 MetaspaceAux::allocated_capacity_bytes(Metaspace::ClassType), | 96 MetaspaceAux::allocated_capacity_bytes(Metaspace::ClassType), |
97 MetaspaceAux::allocated_used_bytes(Metaspace::ClassType), | 97 MetaspaceAux::allocated_used_bytes(Metaspace::ClassType), |
98 MetaspaceAux::reserved_bytes(Metaspace::ClassType)); | 98 MetaspaceAux::reserved_bytes(Metaspace::ClassType)); |
99 | 99 |
100 return MetaspaceSummary(MetaspaceGC::capacity_until_GC(), meta_space, data_space, class_space); | 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); | |
101 } | 107 } |
102 | 108 |
103 void CollectedHeap::print_heap_before_gc() { | 109 void CollectedHeap::print_heap_before_gc() { |
104 if (PrintHeapAtGC) { | 110 if (PrintHeapAtGC) { |
105 Universe::print_heap_before_gc(); | 111 Universe::print_heap_before_gc(); |
126 assert_locked_or_safepoint(CodeCache_lock); | 132 assert_locked_or_safepoint(CodeCache_lock); |
127 } | 133 } |
128 | 134 |
129 void CollectedHeap::trace_heap(GCWhen::Type when, GCTracer* gc_tracer) { | 135 void CollectedHeap::trace_heap(GCWhen::Type when, GCTracer* gc_tracer) { |
130 const GCHeapSummary& heap_summary = create_heap_summary(); | 136 const GCHeapSummary& heap_summary = create_heap_summary(); |
137 gc_tracer->report_gc_heap_summary(when, heap_summary); | |
138 | |
131 const MetaspaceSummary& metaspace_summary = create_metaspace_summary(); | 139 const MetaspaceSummary& metaspace_summary = create_metaspace_summary(); |
132 gc_tracer->report_gc_heap_summary(when, heap_summary, metaspace_summary); | 140 gc_tracer->report_metaspace_summary(when, metaspace_summary); |
133 } | 141 } |
134 | 142 |
135 void CollectedHeap::trace_heap_before_gc(GCTracer* gc_tracer) { | 143 void CollectedHeap::trace_heap_before_gc(GCTracer* gc_tracer) { |
136 trace_heap(GCWhen::BeforeGC, gc_tracer); | 144 trace_heap(GCWhen::BeforeGC, gc_tracer); |
137 } | 145 } |