RFR: 8226797: serviceability/tmtools/jstat/GcCapacityTest.java fails with Exception: java.lang.RuntimeException: OGCMN > OGCMX (min generation capacity > max generation capacity)

Stefan Karlsson stefan.karlsson at oracle.com
Thu Dec 12 12:52:55 UTC 2019


Thanks, Thomas.

StefanK

On 2019-12-12 13:05, Thomas Schatzl wrote:
> Hi,
> 
> On 12.12.19 13:01, Stefan Karlsson wrote:
>> Hi all,
>>
>> Please review this patch to fix a problem with unintialized values in 
>> our generation counters.
>>
>> https://cr.openjdk.java.net/~stefank/8226797/webrev.01/
>> https://bugs.openjdk.java.net/browse/JDK-8226797
>>
>> The jstat values NGCMN and OGCMN both return uninitialized values.
>>
>> I stumbled upon this while creating a patch to remove the 
>> GenerationSpec class.
>>
>> GenerationSpec::_min_size is never initialized, and then used to 
>> create the generations:
>>
>>      case Generation::DefNew:
>>        return new DefNewGeneration(rs, _init_size, _min_size, _max_size);
>>
>>      case Generation::MarkSweepCompact:
>>        return new TenuredGeneration(rs, _init_size, _min_size, 
>> _max_size, remset);
>>
>> That in turn uses it to initialize the perf counters:
>> DefNewGeneration::DefNewGeneration(ReservedSpace rs,
>>                                     size_t initial_size,
>>                                     size_t min_size,
>>                                     size_t max_size,
>>                                     const char* policy)
>> ...
>>    _gen_counters = new GenerationCounters("new", 0, 3,
>>        min_size, max_size, &_virtual_space);
>>
>> I'm setting the value to _init_size, because it reflects how 
>> MinNewSize and MinOldSize relates to NewSize and OldSize.
> 
> Great find!
> 
> Looks good.
> 
>   Thomas



More information about the hotspot-gc-dev mailing list