RFR (S): 8066566: Refactor ParNewGeneration to contain ParNewTracer

Kim Barrett kim.barrett at oracle.com
Wed Feb 4 20:48:51 UTC 2015

Sorry for the delay; I lost track of this.

On Dec 10, 2014, at 9:51 AM, Marcus Larsson <marcus.larsson at oracle.com> wrote:
> Hi again,
> Updated the patch with some cleanups to use 'const ParNewTracer*' rather than 'ParNewTracer&' where appropriate.
> Webrev:
> http://cr.openjdk.java.net/~mlarsson/8066566/webrev.02/
> Incremental:
> http://cr.openjdk.java.net/~mlarsson/8066566/webrev.01-02/

 417   const ParNewTracer* gc_tracer() const {
 418     return &_gc_tracer;
 419   }

All present calls are in the providing class's implementation, and
could just as easily be replaced with "&_gc_tracer". Returning a
pointer into the implementation of an object is generally best
avoided, and in this case it's unnecessary.  Promoting it to a public
API just adds to the burden.

Other than that, looks good.

Regarding the issue of using references vs pointers that came up in
later discussion, I think it would be better to make that a separate
conversation, and allow this change to proceed. [And I was the person
who brought up the references vs pointers issue.]

More information about the hotspot-gc-dev mailing list