equal
deleted
inserted
replaced
69 class Metablock; |
69 class Metablock; |
70 class Metachunk; |
70 class Metachunk; |
71 class PrintCLDMetaspaceInfoClosure; |
71 class PrintCLDMetaspaceInfoClosure; |
72 class SpaceManager; |
72 class SpaceManager; |
73 class VirtualSpaceList; |
73 class VirtualSpaceList; |
|
74 class VirtualSpaceNode; |
74 } |
75 } |
75 |
76 |
76 // Metaspaces each have a SpaceManager and allocations |
77 // Metaspaces each have a SpaceManager and allocations |
77 // are done by the SpaceManager. Allocations are done |
78 // are done by the SpaceManager. Allocations are done |
78 // out of the current Metachunk. When the current Metachunk |
79 // out of the current Metachunk. When the current Metachunk |
295 class MetaspaceUtils : AllStatic { |
296 class MetaspaceUtils : AllStatic { |
296 |
297 |
297 // Spacemanager updates running counters. |
298 // Spacemanager updates running counters. |
298 friend class metaspace::SpaceManager; |
299 friend class metaspace::SpaceManager; |
299 |
300 |
|
301 // Special access for error reporting (checks without locks). |
|
302 friend class oopDesc; |
|
303 friend class Klass; |
|
304 |
300 // Running counters for statistics concerning in-use chunks. |
305 // Running counters for statistics concerning in-use chunks. |
301 // Note: capacity = used + free + waste + overhead. Note that we do not |
306 // Note: capacity = used + free + waste + overhead. Note that we do not |
302 // count free and waste. Their sum can be deduces from the three other values. |
307 // count free and waste. Their sum can be deduces from the three other values. |
303 // For more details, one should call print_report() from within a safe point. |
308 // For more details, one should call print_report() from within a safe point. |
304 static size_t _capacity_words [Metaspace:: MetadataTypeCount]; |
309 static size_t _capacity_words [Metaspace:: MetadataTypeCount]; |
321 |
326 |
322 static size_t free_chunks_total_words(Metaspace::MetadataType mdtype); |
327 static size_t free_chunks_total_words(Metaspace::MetadataType mdtype); |
323 |
328 |
324 // Helper for print_xx_report. |
329 // Helper for print_xx_report. |
325 static void print_vs(outputStream* out, size_t scale); |
330 static void print_vs(outputStream* out, size_t scale); |
|
331 |
|
332 // Utils to check if a pointer or range is part of a committed metaspace region |
|
333 // without acquiring any locks. |
|
334 static metaspace::VirtualSpaceNode* find_enclosing_virtual_space(const void* p); |
|
335 static bool is_in_committed(const void* p); |
|
336 static bool is_range_in_committed(const void* from, const void* to); |
326 |
337 |
327 public: |
338 public: |
328 |
339 |
329 // Collect used metaspace statistics. This involves walking the CLDG. The resulting |
340 // Collect used metaspace statistics. This involves walking the CLDG. The resulting |
330 // output will be the accumulated values for all live metaspaces. |
341 // output will be the accumulated values for all live metaspaces. |