6980206: G1: assert(has_undefined_max_size, "Undefined max size");
authortonyp
Fri, 27 Aug 2010 13:34:14 -0400
changeset 6427 97a16ae704a5
parent 6425 206fd9fee2cf
child 6428 a774c26f5fc3
6980206: G1: assert(has_undefined_max_size, "Undefined max size"); Summary: An assert in the management.cpp is too strong and assumes the max size is always defined on memory pools, even when we don't need to use it. Reviewed-by: mchung, johnc
hotspot/src/share/vm/services/management.cpp
--- a/hotspot/src/share/vm/services/management.cpp	Wed Aug 25 14:39:55 2010 -0700
+++ b/hotspot/src/share/vm/services/management.cpp	Fri Aug 27 13:34:14 2010 -0400
@@ -785,10 +785,11 @@
     }
   }
 
-  // In our current implementation, all pools should have
-  // defined init and max size
-  assert(!has_undefined_init_size, "Undefined init size");
-  assert(!has_undefined_max_size, "Undefined max size");
+  // In our current implementation, we make sure that all non-heap
+  // pools have defined init and max sizes. Heap pools do not matter,
+  // as we never use total_init and total_max for them.
+  assert(heap || !has_undefined_init_size, "Undefined init size");
+  assert(heap || !has_undefined_max_size,  "Undefined max size");
 
   MemoryUsage usage((heap ? InitialHeapSize : total_init),
                     total_used,