< prev index next >

src/hotspot/share/gc/g1/g1Policy.cpp

Print this page




 669     size_t copied_bytes = _collection_set->bytes_used_before() - freed_bytes;
 670     double cost_per_byte_ms = 0.0;
 671 
 672     if (copied_bytes > 0) {
 673       cost_per_byte_ms = average_time_ms(G1GCPhaseTimes::ObjCopy) / (double) copied_bytes;
 674       _analytics->report_cost_per_byte_ms(cost_per_byte_ms, collector_state()->mark_or_rebuild_in_progress());
 675     }
 676 
 677     if (_collection_set->young_region_length() > 0) {
 678       _analytics->report_young_other_cost_per_region_ms(young_other_time_ms() /
 679                                                         _collection_set->young_region_length());
 680     }
 681 
 682     if (_collection_set->old_region_length() > 0) {
 683       _analytics->report_non_young_other_cost_per_region_ms(non_young_other_time_ms() /
 684                                                             _collection_set->old_region_length());
 685     }
 686 
 687     _analytics->report_constant_other_time_ms(constant_other_time_ms(pause_time_ms));
 688 





 689     _analytics->report_pending_cards((double) _pending_cards);
 690     _analytics->report_rs_lengths((double) _max_rs_lengths);

 691   }
 692 
 693   assert(!(this_pause_included_initial_mark && collector_state()->mark_or_rebuild_in_progress()),
 694          "If the last pause has been an initial mark, we should not have been in the marking window");
 695   if (this_pause_included_initial_mark) {
 696     collector_state()->set_mark_or_rebuild_in_progress(true);
 697   }
 698 
 699   _free_regions_at_end_of_collection = _g1->num_free_regions();
 700   // IHOP control wants to know the expected young gen length if it were not
 701   // restrained by the heap reserve. Using the actual length would make the
 702   // prediction too small and the limit the young gen every time we get to the
 703   // predicted target occupancy.
 704   size_t last_unrestrained_young_length = update_young_list_max_and_target_length();
 705   update_rs_lengths_prediction();
 706 
 707   update_ihop_prediction(app_time_ms / 1000.0,
 708                          _bytes_allocated_in_old_since_last_gc,
 709                          last_unrestrained_young_length * HeapRegion::GrainBytes,
 710                          this_pause_was_young_only);




 669     size_t copied_bytes = _collection_set->bytes_used_before() - freed_bytes;
 670     double cost_per_byte_ms = 0.0;
 671 
 672     if (copied_bytes > 0) {
 673       cost_per_byte_ms = average_time_ms(G1GCPhaseTimes::ObjCopy) / (double) copied_bytes;
 674       _analytics->report_cost_per_byte_ms(cost_per_byte_ms, collector_state()->mark_or_rebuild_in_progress());
 675     }
 676 
 677     if (_collection_set->young_region_length() > 0) {
 678       _analytics->report_young_other_cost_per_region_ms(young_other_time_ms() /
 679                                                         _collection_set->young_region_length());
 680     }
 681 
 682     if (_collection_set->old_region_length() > 0) {
 683       _analytics->report_non_young_other_cost_per_region_ms(non_young_other_time_ms() /
 684                                                             _collection_set->old_region_length());
 685     }
 686 
 687     _analytics->report_constant_other_time_ms(constant_other_time_ms(pause_time_ms));
 688 
 689     // Do not update RS lengths and the number of pending cards with information from mixed gc:
 690     // these are is wildly different to during young only gc and mess up young gen sizing right
 691     // after the mixed gc phase.
 692     // During mixed gc we do not use them for young gen sizing.
 693     if (this_pause_was_young_only) {
 694       _analytics->report_pending_cards((double) _pending_cards);
 695       _analytics->report_rs_lengths((double) _max_rs_lengths);
 696     }
 697   }
 698 
 699   assert(!(this_pause_included_initial_mark && collector_state()->mark_or_rebuild_in_progress()),
 700          "If the last pause has been an initial mark, we should not have been in the marking window");
 701   if (this_pause_included_initial_mark) {
 702     collector_state()->set_mark_or_rebuild_in_progress(true);
 703   }
 704 
 705   _free_regions_at_end_of_collection = _g1->num_free_regions();
 706   // IHOP control wants to know the expected young gen length if it were not
 707   // restrained by the heap reserve. Using the actual length would make the
 708   // prediction too small and the limit the young gen every time we get to the
 709   // predicted target occupancy.
 710   size_t last_unrestrained_young_length = update_young_list_max_and_target_length();
 711   update_rs_lengths_prediction();
 712 
 713   update_ihop_prediction(app_time_ms / 1000.0,
 714                          _bytes_allocated_in_old_since_last_gc,
 715                          last_unrestrained_young_length * HeapRegion::GrainBytes,
 716                          this_pause_was_young_only);


< prev index next >