--- a/hotspot/src/share/vm/services/memoryService.hpp Wed May 11 13:19:53 2011 -0400
+++ b/hotspot/src/share/vm/services/memoryService.hpp Thu May 12 10:30:11 2011 -0700
@@ -29,6 +29,7 @@
#include "memory/generation.hpp"
#include "runtime/handles.hpp"
#include "services/memoryUsage.hpp"
+#include "gc_interface/gcCause.hpp"
// Forward declaration
class MemoryPool;
@@ -162,7 +163,8 @@
bool recordPreGCUsage, bool recordPeakUsage);
static void gc_end(bool fullGC, bool recordPostGCUsage,
bool recordAccumulatedGCTime,
- bool recordGCEndTime, bool countCollection);
+ bool recordGCEndTime, bool countCollection,
+ GCCause::Cause cause);
static void oops_do(OopClosure* f);
@@ -172,6 +174,14 @@
// Create an instance of java/lang/management/MemoryUsage
static Handle create_MemoryUsage_obj(MemoryUsage usage, TRAPS);
+
+ static const GCMemoryManager* get_minor_gc_manager() {
+ return _minor_gc_manager;
+ }
+
+ static const GCMemoryManager* get_major_gc_manager() {
+ return _major_gc_manager;
+ }
};
class TraceMemoryManagerStats : public StackObj {
@@ -184,10 +194,11 @@
bool _recordAccumulatedGCTime;
bool _recordGCEndTime;
bool _countCollection;
-
+ GCCause::Cause _cause;
public:
TraceMemoryManagerStats() {}
TraceMemoryManagerStats(bool fullGC,
+ GCCause::Cause cause,
bool recordGCBeginTime = true,
bool recordPreGCUsage = true,
bool recordPeakUsage = true,
@@ -197,6 +208,7 @@
bool countCollection = true);
void initialize(bool fullGC,
+ GCCause::Cause cause,
bool recordGCBeginTime,
bool recordPreGCUsage,
bool recordPeakUsage,
@@ -205,7 +217,7 @@
bool recordGCEndTime,
bool countCollection);
- TraceMemoryManagerStats(Generation::Name kind);
+ TraceMemoryManagerStats(Generation::Name kind, GCCause::Cause cause);
~TraceMemoryManagerStats();
};