Mercurial > hg > graal-jvmci-8
comparison src/share/vm/memory/metaspace.hpp @ 12063:1a8fb39bdbc4
8014659: NPG: performance counters for compressed klass space
Reviewed-by: mgerdin, coleenp, hseigel, jmasa, ctornqvi
author | ehelin |
---|---|
date | Wed, 07 Aug 2013 16:47:32 +0200 |
parents | 740e263c80c6 |
children | 7944aba7ba41 |
comparison
equal
deleted
inserted
replaced
12061:e5003079dfa5 | 12063:1a8fb39bdbc4 |
---|---|
134 static VirtualSpaceList* _space_list; | 134 static VirtualSpaceList* _space_list; |
135 static VirtualSpaceList* _class_space_list; | 135 static VirtualSpaceList* _class_space_list; |
136 | 136 |
137 static VirtualSpaceList* space_list() { return _space_list; } | 137 static VirtualSpaceList* space_list() { return _space_list; } |
138 static VirtualSpaceList* class_space_list() { return _class_space_list; } | 138 static VirtualSpaceList* class_space_list() { return _class_space_list; } |
139 static VirtualSpaceList* get_space_list(MetadataType mdtype) { | |
140 assert(mdtype != MetadataTypeCount, "MetadaTypeCount can't be used as mdtype"); | |
141 return mdtype == ClassType ? class_space_list() : space_list(); | |
142 } | |
139 | 143 |
140 // This is used by DumpSharedSpaces only, where only _vsm is used. So we will | 144 // This is used by DumpSharedSpaces only, where only _vsm is used. So we will |
141 // maintain a single list for now. | 145 // maintain a single list for now. |
142 void record_allocation(void* ptr, MetaspaceObj::Type type, size_t word_size); | 146 void record_allocation(void* ptr, MetaspaceObj::Type type, size_t word_size); |
143 | 147 |
216 | 220 |
217 }; | 221 }; |
218 | 222 |
219 class MetaspaceAux : AllStatic { | 223 class MetaspaceAux : AllStatic { |
220 static size_t free_chunks_total(Metaspace::MetadataType mdtype); | 224 static size_t free_chunks_total(Metaspace::MetadataType mdtype); |
221 static size_t free_chunks_total_in_bytes(Metaspace::MetadataType mdtype); | |
222 | 225 |
223 public: | 226 public: |
224 // Statistics for class space and data space in metaspace. | 227 // Statistics for class space and data space in metaspace. |
225 | 228 |
226 // These methods iterate over the classloader data graph | 229 // These methods iterate over the classloader data graph |
260 } | 263 } |
261 | 264 |
262 // Used by MetaspaceCounters | 265 // Used by MetaspaceCounters |
263 static size_t free_chunks_total(); | 266 static size_t free_chunks_total(); |
264 static size_t free_chunks_total_in_bytes(); | 267 static size_t free_chunks_total_in_bytes(); |
268 static size_t free_chunks_total_in_bytes(Metaspace::MetadataType mdtype); | |
265 | 269 |
266 static size_t allocated_capacity_words(Metaspace::MetadataType mdtype) { | 270 static size_t allocated_capacity_words(Metaspace::MetadataType mdtype) { |
267 return _allocated_capacity_words[mdtype]; | 271 return _allocated_capacity_words[mdtype]; |
268 } | 272 } |
269 static size_t allocated_capacity_words() { | 273 static size_t allocated_capacity_words() { |
292 static size_t allocated_used_bytes() { | 296 static size_t allocated_used_bytes() { |
293 return allocated_used_words() * BytesPerWord; | 297 return allocated_used_words() * BytesPerWord; |
294 } | 298 } |
295 | 299 |
296 static size_t free_bytes(); | 300 static size_t free_bytes(); |
301 static size_t free_bytes(Metaspace::MetadataType mdtype); | |
297 | 302 |
298 // Total capacity in all Metaspaces | 303 // Total capacity in all Metaspaces |
299 static size_t capacity_bytes_slow() { | 304 static size_t capacity_bytes_slow() { |
300 #ifdef PRODUCT | 305 #ifdef PRODUCT |
301 // Use allocated_capacity_bytes() in PRODUCT instead of this function. | 306 // Use allocated_capacity_bytes() in PRODUCT instead of this function. |