RFR: JDK-8057632 - Remove auxiliary code used to handle the generations array

Kim Barrett kim.barrett at oracle.com
Tue Mar 3 08:30:50 UTC 2015

On Mar 2, 2015, at 1:22 PM, Jesper Wilhelmsson <jesper.wilhelmsson at oracle.com> wrote:
> Hi,
> The generation array removal enabled several other cleanups. I have several changes in queue to perform these cleanups one at a time.
> In this change the methods next_gen(), prev_gen() and get_gen() are removed and calls are replaced with explicit calls to young_gen() and old_gen().
> Please have a look.
> Bug: https://bugs.openjdk.java.net/browse/JDK-8057632
> Webrev: http://cr.openjdk.java.net/~jwilhelm/8057632/webrev.02/
> Thanks!
> /Jesper

Looks good.

A couple of questions:


Maybe this will be part of the planned future cleanups, but I'll
mention it now, just in case.

There are various places where _old_gen is assigned or tested for
NULL.  This all seems rather odd; shouldn't there just be an
associated old generation that is recorded in _old_gen at construction
time or thereabouts, and be done with it?

 533   nonstatic_field(DefNewGeneration,            _next_gen,                                     Generation*)                           \

Was it intentional to remove rather than rename to _old_gen here?

More information about the hotspot-gc-dev mailing list