src/share/vm/services/memoryService.hpp

Print this page




 132     return _pools_list->length();
 133   }
 134   static const int num_memory_managers() {
 135     return _managers_list->length();
 136   }
 137 
 138   static MemoryPool* get_memory_pool(int index) {
 139     return _pools_list->at(index);
 140   }
 141 
 142   static MemoryManager* get_memory_manager(int index) {
 143     return _managers_list->at(index);
 144   }
 145 
 146   static void track_memory_usage();
 147   static void track_code_cache_memory_usage() {
 148     track_memory_pool_usage(_code_heap_pool);
 149   }
 150   static void track_memory_pool_usage(MemoryPool* pool);
 151 
 152   static void gc_begin(bool fullGC);
 153   static void gc_end(bool fullGC);




 154 

 155   static void oops_do(OopClosure* f);
 156 
 157   static bool get_verbose() { return PrintGC; }
 158   static bool set_verbose(bool verbose);
 159 
 160   // Create an instance of java/lang/management/MemoryUsage
 161   static Handle create_MemoryUsage_obj(MemoryUsage usage, TRAPS);
 162 };
 163 
 164 class TraceMemoryManagerStats : public StackObj {
 165 private:
 166   bool         _fullGC;








 167 public:
 168   TraceMemoryManagerStats(bool fullGC);


















 169   TraceMemoryManagerStats(Generation::Name kind);
 170   ~TraceMemoryManagerStats();
 171 };


 132     return _pools_list->length();
 133   }
 134   static const int num_memory_managers() {
 135     return _managers_list->length();
 136   }
 137 
 138   static MemoryPool* get_memory_pool(int index) {
 139     return _pools_list->at(index);
 140   }
 141 
 142   static MemoryManager* get_memory_manager(int index) {
 143     return _managers_list->at(index);
 144   }
 145 
 146   static void track_memory_usage();
 147   static void track_code_cache_memory_usage() {
 148     track_memory_pool_usage(_code_heap_pool);
 149   }
 150   static void track_memory_pool_usage(MemoryPool* pool);
 151 
 152   static void gc_begin(bool fullGC, bool recordGCBeginTime,
 153                        bool recordAccumulatedGCTime, 
 154                        bool recordPreGCUsage, bool recordPeakUsage);
 155   static void gc_end(bool fullGC, bool recordPostGCUsage,
 156                      bool recordAccumulatedGCTime,
 157                      bool recordGCEndTime, bool countCollection);
 158 
 159 
 160   static void oops_do(OopClosure* f);
 161 
 162   static bool get_verbose() { return PrintGC; }
 163   static bool set_verbose(bool verbose);
 164 
 165   // Create an instance of java/lang/management/MemoryUsage
 166   static Handle create_MemoryUsage_obj(MemoryUsage usage, TRAPS);
 167 };
 168 
 169 class TraceMemoryManagerStats : public StackObj {
 170 private:
 171   bool         _fullGC;
 172   bool         _recordGCBeginTime;
 173   bool         _recordPreGCUsage;
 174   bool         _recordPeakUsage;
 175   bool         _recordPostGCUsage;
 176   bool         _recordAccumulatedGCTime;
 177   bool         _recordGCEndTime;
 178   bool         _countCollection;
 179 
 180 public:
 181   TraceMemoryManagerStats() {}
 182   TraceMemoryManagerStats(bool fullGC,
 183                           bool recordGCBeginTime = true,
 184                           bool recordPreGCUsage = true,
 185                           bool recordPeakUsage = true,
 186                           bool recordPostGCUsage = true,
 187                           bool recordAccumulatedGCTime = true,
 188                           bool recordGCEndTime = true,
 189                           bool countCollection = true);
 190 
 191   void initialize(bool fullGC,
 192                   bool recordGCBeginTime,
 193                   bool recordPreGCUsage,
 194                   bool recordPeakUsage,
 195                   bool recordPostGCUsage,
 196                   bool recordAccumulatedGCTime,
 197                   bool recordGCEndTime,
 198                   bool countCollection);
 199 
 200   TraceMemoryManagerStats(Generation::Name kind);
 201   ~TraceMemoryManagerStats();
 202 };