RFR (M): 8137082: Factor out G1 prediction code from G1CollectorPolicy and clean up

Thomas Schatzl thomas.schatzl at oracle.com
Wed Oct 14 15:50:33 UTC 2015


Hi Sangheon,

On Tue, 2015-10-13 at 15:37 -0700, sangheon.kim wrote:
> Hi Thomas,
> 
> This is nice!
> 
> Let me add 1 question.
> 
> src/share/vm/gc/g1/g1Predictions.hpp
> 
>    39   // Five or more samples yields zero (at that point we use the stddev); fewer
>    40   // scale the sample set average linearly from 2.0 times the average to 0.5 times
>    41   // it.
>    42   double stddev_estimate_for_small_sample_sets(TruncatedSeq const* seq) const {
>    43     int const samples = seq->num();
>    44     if (samples > 4) {
>    45       return 0.0;
>    46     } else {
>    47       return seq->davg() * (5 - samples) / 2.0;
>    48     }
> 
> 'samples' couldn't be zero?
> If yes, line 40, '2.0 times' is not correct.
> And I know this comment is not your change.

  thanks for looking at this. As mentioned in the answer to Kim,
seq->num() may actually be zero. There I also mentioned that there is
existing code that depends on us being able to call get_new_prediction()
with an empty sample sequence, that has been moved to a separate CR.

Thanks,
  Thomas





More information about the hotspot-gc-dev mailing list