hotspot/src/share/vm/services/memoryService.hpp
changeset 6245 c37d2cf6de1a
parent 5547 f4b087cbb361
child 7397 5b173b4ca846
equal deleted inserted replaced
5717:54c9f1acbd37 6245:c37d2cf6de1a
   147   static void track_code_cache_memory_usage() {
   147   static void track_code_cache_memory_usage() {
   148     track_memory_pool_usage(_code_heap_pool);
   148     track_memory_pool_usage(_code_heap_pool);
   149   }
   149   }
   150   static void track_memory_pool_usage(MemoryPool* pool);
   150   static void track_memory_pool_usage(MemoryPool* pool);
   151 
   151 
   152   static void gc_begin(bool fullGC);
   152   static void gc_begin(bool fullGC, bool recordGCBeginTime,
   153   static void gc_end(bool fullGC);
   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 
   154 
   159 
   155   static void oops_do(OopClosure* f);
   160   static void oops_do(OopClosure* f);
   156 
   161 
   157   static bool get_verbose() { return PrintGC; }
   162   static bool get_verbose() { return PrintGC; }
   158   static bool set_verbose(bool verbose);
   163   static bool set_verbose(bool verbose);
   162 };
   167 };
   163 
   168 
   164 class TraceMemoryManagerStats : public StackObj {
   169 class TraceMemoryManagerStats : public StackObj {
   165 private:
   170 private:
   166   bool         _fullGC;
   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 
   167 public:
   180 public:
   168   TraceMemoryManagerStats(bool fullGC);
   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 
   169   TraceMemoryManagerStats(Generation::Name kind);
   200   TraceMemoryManagerStats(Generation::Name kind);
   170   ~TraceMemoryManagerStats();
   201   ~TraceMemoryManagerStats();
   171 };
   202 };