hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
changeset 11206 040c80ccd07f
parent 11176 9bb1ddd8da51
child 11249 b0c1cc35cafe
equal deleted inserted replaced
11205:f07e6dd70a1f 11206:040c80ccd07f
  1547         _fully_young_cards_per_entry_ratio_seq->add(cards_per_entry_ratio);
  1547         _fully_young_cards_per_entry_ratio_seq->add(cards_per_entry_ratio);
  1548       else
  1548       else
  1549         _partially_young_cards_per_entry_ratio_seq->add(cards_per_entry_ratio);
  1549         _partially_young_cards_per_entry_ratio_seq->add(cards_per_entry_ratio);
  1550     }
  1550     }
  1551 
  1551 
  1552     size_t rs_length_diff = _max_rs_lengths - _recorded_rs_lengths;
  1552     // It turns out that, sometimes, _max_rs_lengths can get smaller
  1553     if (rs_length_diff >= 0)
  1553     // than _recorded_rs_lengths which causes rs_length_diff to get
  1554       _rs_length_diff_seq->add((double) rs_length_diff);
  1554     // very large and mess up the RSet length predictions. We'll be
       
  1555     // defensive until we work out why this happens.
       
  1556     size_t rs_length_diff = 0;
       
  1557     if (_max_rs_lengths > _recorded_rs_lengths) {
       
  1558       rs_length_diff = _max_rs_lengths - _recorded_rs_lengths;
       
  1559     }
       
  1560     _rs_length_diff_seq->add((double) rs_length_diff);
  1555 
  1561 
  1556     size_t copied_bytes = surviving_bytes;
  1562     size_t copied_bytes = surviving_bytes;
  1557     double cost_per_byte_ms = 0.0;
  1563     double cost_per_byte_ms = 0.0;
  1558     if (copied_bytes > 0) {
  1564     if (copied_bytes > 0) {
  1559       cost_per_byte_ms = obj_copy_time / (double) copied_bytes;
  1565       cost_per_byte_ms = obj_copy_time / (double) copied_bytes;