7078465: G1: Don't use the undefined value (-1) for the G1 old memory pool max size
authortonyp
Thu, 19 Jan 2012 09:13:58 -0500
changeset 11579 6c94c23b3199
parent 11578 fc6f77eca886
child 11580 05e16a45f0f3
7078465: G1: Don't use the undefined value (-1) for the G1 old memory pool max size Reviewed-by: johnc, brutisso
hotspot/src/share/vm/gc_implementation/g1/g1MonitoringSupport.hpp
hotspot/src/share/vm/services/g1MemoryPool.hpp
--- a/hotspot/src/share/vm/gc_implementation/g1/g1MonitoringSupport.hpp	Tue Jan 17 10:21:43 2012 -0800
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1MonitoringSupport.hpp	Thu Jan 19 09:13:58 2012 -0500
@@ -89,16 +89,15 @@
 //
 // * Min Capacity
 //
-//    We set this to 0 for all spaces. We could consider setting the old
-//    min capacity to the min capacity of the heap (see 7078465).
+//    We set this to 0 for all spaces.
 //
 // * Max Capacity
 //
 //    For jstat, we set the max capacity of all spaces to heap_capacity,
-//    given that we don't always have a reasonably upper bound on how big
-//    each space can grow. For the memory pools, we actually make the max
-//    capacity undefined. We could consider setting the old max capacity
-//    to the max capacity of the heap (see 7078465).
+//    given that we don't always have a reasonable upper bound on how big
+//    each space can grow. For the memory pools, we make the max
+//    capacity undefined with the exception of the old memory pool for
+//    which we make the max capacity same as the max heap capacity.
 //
 // If we had more accurate occupancy / capacity information per
 // region set the above calculations would be greatly simplified and
--- a/hotspot/src/share/vm/services/g1MemoryPool.hpp	Tue Jan 17 10:21:43 2012 -0800
+++ b/hotspot/src/share/vm/services/g1MemoryPool.hpp	Thu Jan 19 09:13:58 2012 -0500
@@ -101,7 +101,7 @@
     return _g1mm->old_space_used();
   }
   size_t max_size() const {
-    return _undefined_max;
+    return _g1mm->old_gen_max();
   }
   MemoryUsage get_memory_usage();
 };