CRR (S/M): 7075646: G1: fix inconsistencies in the monitoring data

Tony Printezis tony.printezis at
Wed Aug 10 12:34:53 PDT 2011

Hi all,

I would like a couple of code reviews for some fixes in the G1 
monitoring code:

The main motivation behind these changes is that G1's jstat output has 
inconsistencies and has been causing a few test failures. Here's a quick 
summary of the changes:

- Reworked the way the capacities of the various spaces are calculated 
so that only the eden space used counter needs to be updated when a new 
eden region is allocated.
- Now the values of the various sizes that need to be reported are 
calculated synchronously in all the appropriate places in the code and 
stored so that they do not need to be recalculated every time they are 
- The jstat counters for the young / old gen capacity are now correctly 
- We ensure that when we are reporting a capacity to jstat we 
artficially pad it so that it's never 0 (as jstat does not handle 0 
capacities gracefully).

I attached a file that has before / after output comparisons, along with 
some commentary, for the various jstat GC parameters.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: jstat-comparisons

More information about the hotspot-gc-dev mailing list