RFR: 8071462: Remove G1ParGCAllocator::alloc_buffer_waste

Thomas Schatzl thomas.schatzl at oracle.com
Fri Apr 17 11:08:49 UTC 2015


Hi Michail,

On Wed, 2015-04-15 at 21:42 +0300, Michail Chernov wrote:
> Hi Thomas,
> 
> I tried to make all what you said.
> Webrev: http://cr.openjdk.java.net/~dpochepk/~mchernov/8071462/webrev.02/
> 
> ParGCAllocBuffer::add_undo_waste and 
> ParGCAllocBuffer::undo_last_allocation were made as protected members.
> 
> ParGCAllocBuffer::undo_allocation now does the same as 
> ParScanThreadState::undo_alloc_in_to_space and 
> G1ParGCAllocator::undo_allocation
> 
> G1ParGCAllocator has virtual G1PLABWasteStat wasted() = 0; method which 
> must be implemented in all heirs.
> 
> Introduced new class G1PLABWasteStat (g1Allocator.hpp) that retrieves 
> wasted and undo wasted values from allocation buffers. If new class is 
> not acceptable there, I can add 2 virtual methods to G1ParGCAllocator 
> for retrieving wasted and undo wasted values.

  some comments:

- Introduction of G1PLABWasteStat fine with me, although I would not add
an extra type just for two values to be returned.

- I would prefer to use a noun in the method that returns the
statistics, i.e. waste() instead of wasted(). This can be ignored if you
prefer it the other way.

- in parGCAllocBuffer.cpp:105 there is an extra comma in
PLABStats::adjust_desired_plab_sz()

Otherwise looks good.

Thomas



More information about the hotspot-gc-dev mailing list