Mercurial > hg > graal-jvmci-8
comparison src/share/vm/services/memoryPool.hpp @ 8825:dbd5837b342f
8000754: NPG: Implement a MemoryPool MXBean for Metaspace
Reviewed-by: jmasa, stefank
author | ehelin |
---|---|
date | Fri, 22 Mar 2013 16:10:01 +0100 |
parents | db9981fd3124 |
children | 42e370795a39 |
comparison
equal
deleted
inserted
replaced
8824:7f16d1812865 | 8825:dbd5837b342f |
---|---|
26 #define SHARE_VM_SERVICES_MEMORYPOOL_HPP | 26 #define SHARE_VM_SERVICES_MEMORYPOOL_HPP |
27 | 27 |
28 #include "gc_implementation/shared/mutableSpace.hpp" | 28 #include "gc_implementation/shared/mutableSpace.hpp" |
29 #include "memory/defNewGeneration.hpp" | 29 #include "memory/defNewGeneration.hpp" |
30 #include "memory/heap.hpp" | 30 #include "memory/heap.hpp" |
31 #include "memory/metaspace.hpp" | |
31 #include "memory/space.hpp" | 32 #include "memory/space.hpp" |
32 #include "services/memoryUsage.hpp" | 33 #include "services/memoryUsage.hpp" |
33 #include "utilities/macros.hpp" | 34 #include "utilities/macros.hpp" |
34 #if INCLUDE_ALL_GCS | 35 #if INCLUDE_ALL_GCS |
35 #include "gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp" | 36 #include "gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp" |
220 CodeHeapPool(CodeHeap* codeHeap, const char* name, bool support_usage_threshold); | 221 CodeHeapPool(CodeHeap* codeHeap, const char* name, bool support_usage_threshold); |
221 MemoryUsage get_memory_usage(); | 222 MemoryUsage get_memory_usage(); |
222 size_t used_in_bytes() { return _codeHeap->allocated_capacity(); } | 223 size_t used_in_bytes() { return _codeHeap->allocated_capacity(); } |
223 }; | 224 }; |
224 | 225 |
226 class MetaspacePoolBase : public MemoryPool { | |
227 private: | |
228 Metaspace::MetadataType _md_type; | |
229 protected: | |
230 static const size_t _undefined_max_size = (size_t) -1; | |
231 public: | |
232 MetaspacePoolBase(const char *name, Metaspace::MetadataType md_type, size_t max_size); | |
233 MemoryUsage get_memory_usage(); | |
234 size_t used_in_bytes(); | |
235 }; | |
236 | |
237 class ClassMetaspacePool : public MetaspacePoolBase { | |
238 private: | |
239 size_t calculate_max_size(); | |
240 public: | |
241 ClassMetaspacePool(); | |
242 }; | |
243 | |
244 class MetaspacePool : public MetaspacePoolBase { | |
245 private: | |
246 size_t calculate_max_size(); | |
247 public: | |
248 MetaspacePool(); | |
249 }; | |
250 | |
225 #endif // SHARE_VM_SERVICES_MEMORYPOOL_HPP | 251 #endif // SHARE_VM_SERVICES_MEMORYPOOL_HPP |