RFR: JDK-8016309 - assert(eden_size > 0 && survivor_size > 0) failed
jesper.wilhelmsson at oracle.com
Thu Sep 19 14:38:48 PDT 2013
Could I have a couple of reviews of this cleanup/bugfix.
The bug I intended to fix is JDK-8016309  in which the eden size could end up
with a zero size due to minimum alignment and a too small young gen size.
The alignment was increased in the fix for JDK-6725714  which caused this bug.
Fixing this in the current collector policies was quite messy. Attempts to fix
this issue is actually already implemented in two different places, none of them
results in a properly sized eden. Since Thomas had a patch to cleanup the
collector policies to fix JDK-7057939 , I based my bugfix on his patch
instead of fighting with the mess in the current collector policies. As Thomas
wasn't actively working on finishing his cleanup patch I also continued that
work to finish it.
This cleanup fixes both bugs (JDK-8016309 and JDK-7057939). To extract them to
different patches would be too much work and result in an intermediate state
between the two patches where the ergonomics wouldn't work properly. I have
however split the webrev into two parts:
The first patch contains cosmetic changes (name changes, being consequent in
using local instance variables vs using getters/setters, fixing typos in
The second patch contains the major part of the cleanup work in the collector
policies. The goal has been to make the code easier to follow and pull policy
decisions that had leaked into other code back to the collector policy classes.
Please note that the default value of NewSize has changed from 1M to 2M. Since
the minimum alignment was increased to 512K, the minimal possible young gen size
increased to 1.5M. Having a smaller default would be miss leading as the
ergonomics would increase it every time.
New tests has been added and all existing jtreg arguments tests has been used to
verify that heap sizing ergonomics behaves as expected.
The method GenCollectedHeap::compute_new_generation_sizes was unused. In the
cleanup patch I have commented it out in case anyone left it there on purpose.
I'd prefer to remove it. (Actually the second patch removes the method unless
someone really wants to keep it.)
More information about the hotspot-gc-dev