Thanks, Dan.

StefanK

On 2019-12-12 17:06, Daniel D. Daugherty wrote:
src/hotspot/share/gc/shared/generationSpec.hpp
     No comments.

test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcCapacityResults.java
     No comments.

Thumbs up.

Dan


On 12/12/19 10:23 AM, Stefan Karlsson wrote:
In the interest to get this integrated before the RDP cut-off I'm going to push this ASAP. This has gone through tier1-tier3 testing.

StefanK

On 2019-12-12 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.

Thanks,
StefanK

Reply via email to