RFR (XXS): 8133042: Remove some direct accesses of G1Allocator::reuse_retained_old_region() to G1CollectedHeap members
Thomas Schatzl
thomas.schatzl at oracle.com
Thu Aug 6 14:50:49 UTC 2015
Hi Kim,
thanks for looking at this...
On Wed, 2015-08-05 at 12:54 -0400, Kim Barrett wrote:
> On Aug 5, 2015, at 7:59 AM, Thomas Schatzl <thomas.schatzl at oracle.com> wrote:
> >
> > Hi all,
> >
> > could I have reviews of this tiny change that changes some direct
> > private member accesses of G1Allocator to G1CollectedHeap to some
> > already available public method calls?
> >
> > While this is more a cosmetic change, I thought it would be good to
> > decrease the amount of "friendliness" between those two classes. I could
> > not find a good other CR to add them, so here we are....
> >
> > CR:
> > https://bugs.openjdk.java.net/browse/JDK-8133042
> > Webrev:
> > http://cr.openjdk.java.net/~tschatzl/8133042/webrev/
> > Testing:
> > local compilation
>
> There is very similar code to what is being changed here in G1ArchiveAllocator::alloc_new_region,
> later in the same file (g1Allocator.cpp).
>
> Would the proposed change or the additional change to alloc_new_region permit the elimination
> of any friend declarations from G1CollectedHeap?
>
only if some additional methods from G1CollectedHeap were made public.
Here is a webrev doing that:
http://cr.openjdk.java.net/~tschatzl/8133042/webrev.1/ (full only
because the original change has been so tiny)
I am fine with either version.
Thanks,
Thomas
More information about the hotspot-gc-dev
mailing list