RFR (S): 8066566: Refactor ParNewGeneration to contain ParNewTracer
Marcus Larsson
marcus.larsson at oracle.com
Thu Feb 5 08:20:22 UTC 2015
Hi Kim,
Thanks for looking at this.
On 04/02/15 21:48, Kim Barrett wrote:
> 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/
> src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
> 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.
As I mentioned in the original email, this getter for the field is added
although it is currently unnecessary.
However, it is added in preparation for
https://bugs.openjdk.java.net/browse/JDK-8066444 and will soon be required.
Arguably the addition of this getter belongs to that CR, but I thought I
might as well add it here while doing the refactoring.
>
> 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.]
>
Thanks,
Marcus
More information about the hotspot-gc-dev
mailing list