changeset 6255:6893af47a321

8035667: EventMetaspaceSummary doesn't report committed Metaspace memory Reviewed-by: jmasa, stefank
author ehelin
date Wed, 26 Mar 2014 14:15:02 +0100
parents 61ef648e2901
children 651b905b39de 7901f4c9c3cc
files src/share/vm/gc_implementation/shared/gcHeapSummary.hpp src/share/vm/gc_implementation/shared/gcTraceSend.cpp src/share/vm/gc_interface/collectedHeap.cpp src/share/vm/trace/trace.xml
diffstat 4 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/shared/gcHeapSummary.hpp	Thu Apr 03 10:39:27 2014 +0200
+++ b/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/src/share/vm/gc_implementation/shared/gcTraceSend.cpp	Thu Apr 03 10:39:27 2014 +0200
+++ b/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/src/share/vm/gc_interface/collectedHeap.cpp	Thu Apr 03 10:39:27 2014 +0200
+++ b/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/src/share/vm/trace/trace.xml	Thu Apr 03 10:39:27 2014 +0200
+++ b/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>