diff --git a/src/hotspot/share/gc/shared/generationSpec.hpp b/src/hotspot/share/gc/shared/generationSpec.hpp index 2933551a78..f943d83c47 100644 --- a/src/hotspot/share/gc/shared/generationSpec.hpp +++ b/src/hotspot/share/gc/shared/generationSpec.hpp @@ -44,6 +44,7 @@ public: 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)) { } diff --git a/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcCapacityResults.java b/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcCapacityResults.java index 350a2a6470..8f81be763b 100644 --- a/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcCapacityResults.java +++ b/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcCapacityResults.java @@ -70,6 +70,7 @@ public class JstatGcCapacityResults extends JstatResults { // 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 @@ public class JstatGcCapacityResults extends JstatResults { // 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)");