src/share/vm/services/memoryService.hpp

changeset 2888
78542e2b5e35
parent 2314
f95d63e2154a
child 4037
da91efe96a93
     1.1 --- a/src/share/vm/services/memoryService.hpp	Wed May 11 13:19:53 2011 -0400
     1.2 +++ b/src/share/vm/services/memoryService.hpp	Thu May 12 10:30:11 2011 -0700
     1.3 @@ -29,6 +29,7 @@
     1.4  #include "memory/generation.hpp"
     1.5  #include "runtime/handles.hpp"
     1.6  #include "services/memoryUsage.hpp"
     1.7 +#include "gc_interface/gcCause.hpp"
     1.8  
     1.9  // Forward declaration
    1.10  class MemoryPool;
    1.11 @@ -162,7 +163,8 @@
    1.12                         bool recordPreGCUsage, bool recordPeakUsage);
    1.13    static void gc_end(bool fullGC, bool recordPostGCUsage,
    1.14                       bool recordAccumulatedGCTime,
    1.15 -                     bool recordGCEndTime, bool countCollection);
    1.16 +                     bool recordGCEndTime, bool countCollection,
    1.17 +                     GCCause::Cause cause);
    1.18  
    1.19  
    1.20    static void oops_do(OopClosure* f);
    1.21 @@ -172,6 +174,14 @@
    1.22  
    1.23    // Create an instance of java/lang/management/MemoryUsage
    1.24    static Handle create_MemoryUsage_obj(MemoryUsage usage, TRAPS);
    1.25 +
    1.26 +  static const GCMemoryManager* get_minor_gc_manager() {
    1.27 +      return _minor_gc_manager;
    1.28 +  }
    1.29 +
    1.30 +  static const GCMemoryManager* get_major_gc_manager() {
    1.31 +      return _major_gc_manager;
    1.32 +  }
    1.33  };
    1.34  
    1.35  class TraceMemoryManagerStats : public StackObj {
    1.36 @@ -184,10 +194,11 @@
    1.37    bool         _recordAccumulatedGCTime;
    1.38    bool         _recordGCEndTime;
    1.39    bool         _countCollection;
    1.40 -
    1.41 +  GCCause::Cause _cause;
    1.42  public:
    1.43    TraceMemoryManagerStats() {}
    1.44    TraceMemoryManagerStats(bool fullGC,
    1.45 +                          GCCause::Cause cause,
    1.46                            bool recordGCBeginTime = true,
    1.47                            bool recordPreGCUsage = true,
    1.48                            bool recordPeakUsage = true,
    1.49 @@ -197,6 +208,7 @@
    1.50                            bool countCollection = true);
    1.51  
    1.52    void initialize(bool fullGC,
    1.53 +                  GCCause::Cause cause,
    1.54                    bool recordGCBeginTime,
    1.55                    bool recordPreGCUsage,
    1.56                    bool recordPeakUsage,
    1.57 @@ -205,7 +217,7 @@
    1.58                    bool recordGCEndTime,
    1.59                    bool countCollection);
    1.60  
    1.61 -  TraceMemoryManagerStats(Generation::Name kind);
    1.62 +  TraceMemoryManagerStats(Generation::Name kind, GCCause::Cause cause);
    1.63    ~TraceMemoryManagerStats();
    1.64  };
    1.65  

mercurial