changeset 57419:2c724dba4c3c jdk-15+0

8226797: serviceability/tmtools/jstat/GcCapacityTest.java fails with Exception: java.lang.RuntimeException: OGCMN > OGCMX (min generation capacity > max generation capacity) Reviewed-by: sjohanss, tschatzl
author stefank
date Thu, 12 Dec 2019 16:23:13 +0100
parents fe65e995a765
children fa20258f2d71 7a1e6bd6a836
files src/hotspot/share/gc/shared/generationSpec.hpp test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcCapacityResults.java
diffstat 2 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/gc/shared/generationSpec.hpp	Thu Dec 12 14:22:50 2019 +0100
+++ b/src/hotspot/share/gc/shared/generationSpec.hpp	Thu Dec 12 16:23:13 2019 +0100
@@ -44,6 +44,7 @@
   GenerationSpec(Generation::Name name, size_t init_size, size_t max_size, size_t alignment) :
     _name(name),
     _init_size(align_up(init_size, alignment)),
+    _min_size(_init_size),
     _max_size(align_up(max_size, alignment))
   { }
 
--- a/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcCapacityResults.java	Thu Dec 12 14:22:50 2019 +0100
+++ b/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcCapacityResults.java	Thu Dec 12 16:23:13 2019 +0100
@@ -70,6 +70,7 @@
 
         // Check Young Gen consistency
         float NGCMN = getFloatValue("NGCMN");
+        assertThat(NGCMN >= 0, "NGCMN < 0 (min generation capacity is negative)");
         float NGCMX = getFloatValue("NGCMX");
         assertThat(NGCMX >= NGCMN, "NGCMN > NGCMX (min generation capacity > max generation capacity)");
 
@@ -102,6 +103,7 @@
 
         // Check Old Gen consistency
         float OGCMN = getFloatValue("OGCMN");
+        assertThat(OGCMN >= 0, "OGCMN < 0 (min generation capacity is negative)");
         float OGCMX = getFloatValue("OGCMX");
         assertThat(OGCMX >= OGCMN, "OGCMN > OGCMX (min generation capacity > max generation capacity)");