CRR (XS): 7118202: G1: eden size unnecessarily drops to the minimum

Bengt Rutisson bengt.rutisson at
Mon Dec 5 21:35:35 UTC 2011


I am a bit uncomfortable with this change since we don't know exactly 
what is going on. But I think I would prefer this fix instead:

1557     if (_max_rs_lengths > _recorded_rs_lengths) {
1558       size_t rs_length_diff = _max_rs_lengths - _recorded_rs_lengths;
1559     _rs_length_diff_seq->add((double) rs_length_diff);
1560     }

Seems more in line with the original code.

I'd also like to understand if this statement (a little bit further down 
in the same method) is necessary:

1605     _rs_lengths_seq->add((double) _max_rs_lengths);


On 2011-12-05 21:53, Tony Printezis wrote:
> Hi all,
> I'd like a couple of code reviews for this very small change:
> It turns out that _max_rs_lengths gets smaller than 
> _recorded_rs_lengths and rs_length_diff ends up huge which causes RSet 
> lengths to be massively overpredicted.
> We'll leave this small fix in until we work out why the problem 
> happens (or most likely until we revamp the whole prediction code as 
> we're planning to).
> Thanks, again, to Thoms Schatzl for tracking this down.
> Tony

More information about the hotspot-gc-dev mailing list