< prev index next >

src/share/vm/services/memoryManager.hpp

Print this page




  48 
  49 private:
  50   MemoryPool* _pools[max_num_pools];
  51   int         _num_pools;
  52 
  53 protected:
  54   volatile instanceOop _memory_mgr_obj;
  55 
  56 public:
  57   enum Name {
  58     Abstract,
  59     CodeCache,
  60     Metaspace,
  61     Copy,
  62     MarkSweepCompact,
  63     ParNew,
  64     ConcurrentMarkSweep,
  65     PSScavenge,
  66     PSMarkSweep,
  67     G1YoungGen,
  68     G1OldGen


  69   };
  70 
  71   MemoryManager();
  72 
  73   int num_memory_pools() const           { return _num_pools; }
  74   MemoryPool* get_memory_pool(int index) {
  75     assert(index >= 0 && index < _num_pools, "Invalid index");
  76     return _pools[index];
  77   }
  78 
  79   int add_pool(MemoryPool* pool);
  80 
  81   bool is_manager(instanceHandle mh)     { return mh() == _memory_mgr_obj; }
  82 
  83   virtual instanceOop get_memory_manager_instance(TRAPS);
  84   virtual MemoryManager::Name kind()     { return MemoryManager::Abstract; }
  85   virtual bool is_gc_memory_manager()    { return false; }
  86   virtual const char* name() = 0;
  87 
  88   // GC support
  89   void oops_do(OopClosure* f);
  90 
  91   // Static factory methods to get a memory manager of a specific type
  92   static MemoryManager*   get_code_cache_memory_manager();
  93   static MemoryManager*   get_metaspace_memory_manager();
  94   static GCMemoryManager* get_copy_memory_manager();
  95   static GCMemoryManager* get_msc_memory_manager();
  96   static GCMemoryManager* get_parnew_memory_manager();
  97   static GCMemoryManager* get_cms_memory_manager();
  98   static GCMemoryManager* get_psScavenge_memory_manager();
  99   static GCMemoryManager* get_psMarkSweep_memory_manager();
 100   static GCMemoryManager* get_g1YoungGen_memory_manager();
 101   static GCMemoryManager* get_g1OldGen_memory_manager();
 102 

 103 };
 104 
 105 class CodeCacheMemoryManager : public MemoryManager {
 106 private:
 107 public:
 108   CodeCacheMemoryManager() : MemoryManager() {}
 109 
 110   MemoryManager::Name kind() { return MemoryManager::CodeCache; }
 111   const char* name()         { return "CodeCacheManager"; }
 112 };
 113 
 114 class MetaspaceMemoryManager : public MemoryManager {
 115 public:
 116   MetaspaceMemoryManager() : MemoryManager() {}
 117 
 118   MemoryManager::Name kind() { return MemoryManager::Metaspace; }
 119   const char *name()         { return "Metaspace Manager"; }
 120 };
 121 
 122 class GCStatInfo : public ResourceObj {


 279 };
 280 
 281 class G1YoungGenMemoryManager : public GCMemoryManager {
 282 private:
 283 public:
 284   G1YoungGenMemoryManager() : GCMemoryManager() {}
 285 
 286   MemoryManager::Name kind() { return MemoryManager::G1YoungGen; }
 287   const char* name()         { return "G1 Young Generation"; }
 288 };
 289 
 290 class G1OldGenMemoryManager : public GCMemoryManager {
 291 private:
 292 public:
 293   G1OldGenMemoryManager() : GCMemoryManager() {}
 294 
 295   MemoryManager::Name kind() { return MemoryManager::G1OldGen; }
 296   const char* name()         { return "G1 Old Generation"; }
 297 };
 298 















 299 #endif // SHARE_VM_SERVICES_MEMORYMANAGER_HPP


  48 
  49 private:
  50   MemoryPool* _pools[max_num_pools];
  51   int         _num_pools;
  52 
  53 protected:
  54   volatile instanceOop _memory_mgr_obj;
  55 
  56 public:
  57   enum Name {
  58     Abstract,
  59     CodeCache,
  60     Metaspace,
  61     Copy,
  62     MarkSweepCompact,
  63     ParNew,
  64     ConcurrentMarkSweep,
  65     PSScavenge,
  66     PSMarkSweep,
  67     G1YoungGen,
  68     G1OldGen,
  69     ShenandoahCycles,
  70     ShenandoahPauses
  71   };
  72 
  73   MemoryManager();
  74 
  75   int num_memory_pools() const           { return _num_pools; }
  76   MemoryPool* get_memory_pool(int index) {
  77     assert(index >= 0 && index < _num_pools, "Invalid index");
  78     return _pools[index];
  79   }
  80 
  81   int add_pool(MemoryPool* pool);
  82 
  83   bool is_manager(instanceHandle mh)     { return mh() == _memory_mgr_obj; }
  84 
  85   virtual instanceOop get_memory_manager_instance(TRAPS);
  86   virtual MemoryManager::Name kind()     { return MemoryManager::Abstract; }
  87   virtual bool is_gc_memory_manager()    { return false; }
  88   virtual const char* name() = 0;
  89 
  90   // GC support
  91   void oops_do(OopClosure* f);
  92 
  93   // Static factory methods to get a memory manager of a specific type
  94   static MemoryManager*   get_code_cache_memory_manager();
  95   static MemoryManager*   get_metaspace_memory_manager();
  96   static GCMemoryManager* get_copy_memory_manager();
  97   static GCMemoryManager* get_msc_memory_manager();
  98   static GCMemoryManager* get_parnew_memory_manager();
  99   static GCMemoryManager* get_cms_memory_manager();
 100   static GCMemoryManager* get_psScavenge_memory_manager();
 101   static GCMemoryManager* get_psMarkSweep_memory_manager();
 102   static GCMemoryManager* get_g1YoungGen_memory_manager();
 103   static GCMemoryManager* get_g1OldGen_memory_manager();
 104   static GCMemoryManager* get_shenandoah_cycles_memory_manager();
 105   static GCMemoryManager* get_shenandoah_pauses_memory_manager();
 106 };
 107 
 108 class CodeCacheMemoryManager : public MemoryManager {
 109 private:
 110 public:
 111   CodeCacheMemoryManager() : MemoryManager() {}
 112 
 113   MemoryManager::Name kind() { return MemoryManager::CodeCache; }
 114   const char* name()         { return "CodeCacheManager"; }
 115 };
 116 
 117 class MetaspaceMemoryManager : public MemoryManager {
 118 public:
 119   MetaspaceMemoryManager() : MemoryManager() {}
 120 
 121   MemoryManager::Name kind() { return MemoryManager::Metaspace; }
 122   const char *name()         { return "Metaspace Manager"; }
 123 };
 124 
 125 class GCStatInfo : public ResourceObj {


 282 };
 283 
 284 class G1YoungGenMemoryManager : public GCMemoryManager {
 285 private:
 286 public:
 287   G1YoungGenMemoryManager() : GCMemoryManager() {}
 288 
 289   MemoryManager::Name kind() { return MemoryManager::G1YoungGen; }
 290   const char* name()         { return "G1 Young Generation"; }
 291 };
 292 
 293 class G1OldGenMemoryManager : public GCMemoryManager {
 294 private:
 295 public:
 296   G1OldGenMemoryManager() : GCMemoryManager() {}
 297 
 298   MemoryManager::Name kind() { return MemoryManager::G1OldGen; }
 299   const char* name()         { return "G1 Old Generation"; }
 300 };
 301 
 302 class ShenandoahCyclesMemoryManager : public GCMemoryManager {
 303 public:
 304   ShenandoahCyclesMemoryManager() : GCMemoryManager() {}
 305 
 306   MemoryManager::Name kind() { return MemoryManager::ShenandoahCycles; }
 307   const char* name()         { return "Shenandoah Cycles"; }
 308 };
 309 
 310 class ShenandoahPausesMemoryManager : public GCMemoryManager {
 311 public:
 312   ShenandoahPausesMemoryManager() : GCMemoryManager() {}
 313 
 314   MemoryManager::Name kind() { return MemoryManager::ShenandoahPauses; }
 315   const char* name()         { return "Shenandoah Pauses"; }
 316 };
 317 #endif // SHARE_VM_SERVICES_MEMORYMANAGER_HPP
< prev index next >