51
52 MemoryPool* _pools[max_num_pools];
53 int _num_pools;
54
55 const char* _name;
56
57 protected:
58 volatile instanceOop _memory_mgr_obj;
59
60 public:
61 MemoryManager(const char* name);
62
63 int num_memory_pools() const { return _num_pools; }
64 MemoryPool* get_memory_pool(int index) {
65 assert(index >= 0 && index < _num_pools, "Invalid index");
66 return _pools[index];
67 }
68
69 void add_pool(MemoryPool* pool);
70
71 bool is_manager(instanceHandle mh) { return mh() == _memory_mgr_obj; }
72
73 virtual instanceOop get_memory_manager_instance(TRAPS);
74 virtual bool is_gc_memory_manager() { return false; }
75
76 const char* name() const { return _name; }
77
78 // GC support
79 void oops_do(OopClosure* f);
80
81 // Static factory methods to get a memory manager of a specific type
82 static MemoryManager* get_code_cache_memory_manager();
83 static MemoryManager* get_metaspace_memory_manager();
84 };
85
86 class GCStatInfo : public ResourceObj {
87 private:
88 size_t _index;
89 jlong _start_time;
90 jlong _end_time;
91
|
51
52 MemoryPool* _pools[max_num_pools];
53 int _num_pools;
54
55 const char* _name;
56
57 protected:
58 volatile instanceOop _memory_mgr_obj;
59
60 public:
61 MemoryManager(const char* name);
62
63 int num_memory_pools() const { return _num_pools; }
64 MemoryPool* get_memory_pool(int index) {
65 assert(index >= 0 && index < _num_pools, "Invalid index");
66 return _pools[index];
67 }
68
69 void add_pool(MemoryPool* pool);
70
71 bool is_manager(instanceHandle mh) { return oopDesc::equals(mh(), _memory_mgr_obj); }
72
73 virtual instanceOop get_memory_manager_instance(TRAPS);
74 virtual bool is_gc_memory_manager() { return false; }
75
76 const char* name() const { return _name; }
77
78 // GC support
79 void oops_do(OopClosure* f);
80
81 // Static factory methods to get a memory manager of a specific type
82 static MemoryManager* get_code_cache_memory_manager();
83 static MemoryManager* get_metaspace_memory_manager();
84 };
85
86 class GCStatInfo : public ResourceObj {
87 private:
88 size_t _index;
89 jlong _start_time;
90 jlong _end_time;
91
|