RFR (S): 7057939 : jmap shows MaxNewSize=4GB when Java is using parallel collector

Thomas Schatzl thomas.schatzl at oracle.com
Wed Apr 17 17:53:38 UTC 2013


Hi all,

  could I have some reviews for the change for CR 7057939?

The problem presented in that CR is that if MaxNewSize is not specified on the command line, it will never be updated by the internal sizing logic.

So programs like jmap that read MaxNewSize always display uintx_max.

The patch simply updates the MaxNewSize global after the sizing logic
has been applied for all heaps (in GenCollectorPolicy and
G1CollectorPolicy) as this problem is not only specific to parallel gc.

The change for G1CollectorPolicy is slightly more complicated because there are multiple exits in the constructor of G1YoungGenSizer (where this
calculation happens).
Also depending on the sizing goals for G1, a different calculation for MaxNewSize has to be applied.

In particular, if NewRatio is defined, the MaxNewSize is MaxHeapSize divided by NewRatio, otherwise it is dependent on G1MaxNewSizePercent.

I also moved some asserts from G1YoungGenSizer to checks in argument processing as the asserts are actually mandatory (range checking).

Bugs.sun:
http://bugs.sun.com/view_bug.do?bug_id=7057939

JIRA:
https://jbs.oracle.com/bugs/browse/JDK-7057939

Webrev:
http://cr.openjdk.java.net/~tschatzl/7057939/webrev/

Testing:
jprt, jtreg tests

Thanks,
Thomas



More information about the hotspot-gc-dev mailing list