RFR(S): 8007036: G1: Too many old regions added to last mixed GC

John Cuthbertson john.cuthbertson at oracle.com
Mon Mar 4 09:44:22 PST 2013


Hi Bengt,

Thanks for looking over the changes.

On 3/4/2013 3:59 AM, Bengt Rutisson wrote:
>
> One question. You added a note to the _length field in 
> CollectionSetChooser:
>
>   // The number of candidate old regions added to the CSet chooser.
>   // Note: this is not updated when removing a region using
>   // remove_and_move_to_next() below.
>   uint _length;
>
> As far as I can tell we should really decrement the _length field in 
> remove_and_move_to_next(). Would it maybe be better to fix this (as a 
> separate change of course) than to add the note? I guess the code 
> works since we don't use the length information after finlalize_cset() 
> but it feels a bit fragile.

Good point. They only reason not to do this is that we don't actually 
remove the element from the CollectionSetChooser. I'm not sure why. IIRC 
we only use the length to calculate out the ideal minimum number and 
absolute maximum number of old regions to collect each mixed GC.  I'll 
submit a new CR for your suggestion. I think changing the 
CollectionSetChooser to use the RegionList abstraction would probably be 
the way to go.

Thanks,

JohnC


More information about the hotspot-gc-dev mailing list