8035667: EventMetaspaceSummary doesn't report committed Metaspace memory
authorehelin
Wed, 26 Mar 2014 14:15:02 +0100
changeset 23853 3e1633ff6996
parent 23852 b1d6f9920924
child 23854 50f7f89b34e0
child 23855 c4574075402c
8035667: EventMetaspaceSummary doesn't report committed Metaspace memory Reviewed-by: jmasa, stefank
hotspot/src/share/vm/gc_implementation/shared/gcHeapSummary.hpp
hotspot/src/share/vm/gc_implementation/shared/gcTraceSend.cpp
hotspot/src/share/vm/gc_interface/collectedHeap.cpp
hotspot/src/share/vm/trace/trace.xml
--- a/hotspot/src/share/vm/gc_implementation/shared/gcHeapSummary.hpp	Thu Apr 03 10:39:27 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/shared/gcHeapSummary.hpp	Wed Mar 26 14:15:02 2014 +0100
@@ -62,16 +62,16 @@
 };
 
 class MetaspaceSizes : public StackObj {
-  size_t _capacity;
+  size_t _committed;
   size_t _used;
   size_t _reserved;
 
  public:
-  MetaspaceSizes() : _capacity(0), _used(0), _reserved(0) {}
-  MetaspaceSizes(size_t capacity, size_t used, size_t reserved) :
-    _capacity(capacity), _used(used), _reserved(reserved) {}
+  MetaspaceSizes() : _committed(0), _used(0), _reserved(0) {}
+  MetaspaceSizes(size_t committed, size_t used, size_t reserved) :
+    _committed(committed), _used(used), _reserved(reserved) {}
 
-  size_t capacity() const { return _capacity; }
+  size_t committed() const { return _committed; }
   size_t used() const { return _used; }
   size_t reserved() const { return _reserved; }
 };
--- a/hotspot/src/share/vm/gc_implementation/shared/gcTraceSend.cpp	Thu Apr 03 10:39:27 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/shared/gcTraceSend.cpp	Wed Mar 26 14:15:02 2014 +0100
@@ -258,7 +258,7 @@
 static TraceStructMetaspaceSizes to_trace_struct(const MetaspaceSizes& sizes) {
   TraceStructMetaspaceSizes meta_sizes;
 
-  meta_sizes.set_capacity(sizes.capacity());
+  meta_sizes.set_committed(sizes.committed());
   meta_sizes.set_used(sizes.used());
   meta_sizes.set_reserved(sizes.reserved());
 
--- a/hotspot/src/share/vm/gc_interface/collectedHeap.cpp	Thu Apr 03 10:39:27 2014 +0200
+++ b/hotspot/src/share/vm/gc_interface/collectedHeap.cpp	Wed Mar 26 14:15:02 2014 +0100
@@ -85,15 +85,15 @@
 
 MetaspaceSummary CollectedHeap::create_metaspace_summary() {
   const MetaspaceSizes meta_space(
-      MetaspaceAux::allocated_capacity_bytes(),
+      MetaspaceAux::committed_bytes(),
       MetaspaceAux::allocated_used_bytes(),
       MetaspaceAux::reserved_bytes());
   const MetaspaceSizes data_space(
-      MetaspaceAux::allocated_capacity_bytes(Metaspace::NonClassType),
+      MetaspaceAux::committed_bytes(Metaspace::NonClassType),
       MetaspaceAux::allocated_used_bytes(Metaspace::NonClassType),
       MetaspaceAux::reserved_bytes(Metaspace::NonClassType));
   const MetaspaceSizes class_space(
-      MetaspaceAux::allocated_capacity_bytes(Metaspace::ClassType),
+      MetaspaceAux::committed_bytes(Metaspace::ClassType),
       MetaspaceAux::allocated_used_bytes(Metaspace::ClassType),
       MetaspaceAux::reserved_bytes(Metaspace::ClassType));
 
--- a/hotspot/src/share/vm/trace/trace.xml	Thu Apr 03 10:39:27 2014 +0200
+++ b/hotspot/src/share/vm/trace/trace.xml	Wed Mar 26 14:15:02 2014 +0100
@@ -185,7 +185,7 @@
     </event>
 
     <struct id="MetaspaceSizes">
-      <value type="BYTES64" field="capacity" label="Capacity" description="Total available memory to allocate in" />
+      <value type="BYTES64" field="committed" label="Committed" description="Committed memory for this space" />
       <value type="BYTES64" field="used" label="Used" description="Bytes allocated by objects in the space" />
       <value type="BYTES64" field="reserved" label="Reserved" description="Reserved memory for this space" />
     </struct>