< prev index next >

src/hotspot/share/gc/g1/g1MonitoringSupport.cpp

Print this page
rev 55209 : imported patch 8220089.webrev.1
rev 55210 : imported patch 8220089.webrev.2

@@ -240,11 +240,13 @@
 
   uint survivor_list_length = _g1h->survivor_regions_count();
   // Max length includes any potential extensions to the young gen
   // we'll do when the GC locker is active.
   uint young_list_max_length = _g1h->policy()->young_list_max_length();
-  assert(young_list_max_length >= survivor_list_length, "invariant");
+  assert(young_list_max_length >= survivor_list_length, "Max young gen (%u) should be "
+         "larger than or equal to survivor count (%u)",
+         young_list_max_length, survivor_list_length);
   uint eden_list_max_length = young_list_max_length - survivor_list_length;
 
   // First calculate the committed sizes that can be calculated independently.
   _survivor_space_committed = survivor_list_length * HeapRegion::GrainBytes;
   _old_gen_committed = HeapRegion::align_up_to_region_byte_size(_old_gen_used);

@@ -253,11 +255,15 @@
   _overall_committed = _g1h->capacity();
   size_t committed = _overall_committed;
 
   // Remove the committed size we have calculated so far (for the
   // survivor and old space).
-  assert(committed >= (_survivor_space_committed + _old_gen_committed), "sanity");
+  assert(committed >= (_survivor_space_committed + _old_gen_committed),
+         "Committed (" SIZE_FORMAT ") should be larger than or equal to sum (" SIZE_FORMAT
+         ") of survivor committed (" SIZE_FORMAT ") and old gen committed (" SIZE_FORMAT ")",
+         committed, _survivor_space_committed + _old_gen_committed,
+         _survivor_space_committed, _old_gen_committed);
   committed -= _survivor_space_committed + _old_gen_committed;
 
   // Next, calculate and remove the committed size for the eden.
   _eden_space_committed = (size_t) eden_list_max_length * HeapRegion::GrainBytes;
   // Somewhat defensive: be robust in case there are inaccuracies in
< prev index next >