RFR (XXS): 8133042: Remove some direct accesses of G1Allocator::reuse_retained_old_region() to G1CollectedHeap members

Kim Barrett kim.barrett at oracle.com
Wed Aug 5 16:54:12 UTC 2015


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?



More information about the hotspot-gc-dev mailing list