< prev index next >

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

Print this page
rev 55404 : 8226197: Reducing G1?s CPU cost with simplified write post-barrier and disabling concurrent refinement
Summary: A prototype to add a mode for G1 to use a simplified write post-barrier. Guarded by new flag G1FastWriteBarrier.


 473   update_young_list_max_and_target_length();
 474   update_rs_lengths_prediction();
 475 
 476   _bytes_allocated_in_old_since_last_gc = 0;
 477 
 478   record_pause(FullGC, _full_collection_start_sec, end_sec);
 479 }
 480 
 481 void G1Policy::record_collection_pause_start(double start_time_sec) {
 482   // We only need to do this here as the policy will only be applied
 483   // to the GC we're about to start. so, no point is calculating this
 484   // every time we calculate / recalculate the target young length.
 485   update_survivors_policy();
 486 
 487   assert(max_survivor_regions() + _g1h->num_used_regions() <= _g1h->max_regions(),
 488          "Maximum survivor regions %u plus used regions %u exceeds max regions %u",
 489          max_survivor_regions(), _g1h->num_used_regions(), _g1h->max_regions());
 490   assert_used_and_recalculate_used_equal(_g1h);
 491 
 492   phase_times()->record_cur_collection_start_sec(start_time_sec);
 493   _pending_cards = _g1h->pending_card_num();


 494 
 495   _collection_set->reset_bytes_used_before();
 496   _bytes_copied_during_gc = 0;
 497 
 498   // do that for any other surv rate groups
 499   _short_lived_surv_rate_group->stop_adding_regions();
 500   _survivors_age_table.clear();
 501 
 502   assert(_g1h->collection_set()->verify_young_ages(), "region age verification failed");
 503 }
 504 
 505 void G1Policy::record_concurrent_mark_init_end(double mark_init_elapsed_time_ms) {
 506   assert(!collector_state()->initiate_conc_mark_if_possible(), "we should have cleared it by now");
 507   collector_state()->set_in_initial_mark_gc(false);
 508 }
 509 
 510 void G1Policy::record_concurrent_mark_remark_start() {
 511   _mark_remark_start_sec = os::elapsedTime();
 512 }
 513 




 473   update_young_list_max_and_target_length();
 474   update_rs_lengths_prediction();
 475 
 476   _bytes_allocated_in_old_since_last_gc = 0;
 477 
 478   record_pause(FullGC, _full_collection_start_sec, end_sec);
 479 }
 480 
 481 void G1Policy::record_collection_pause_start(double start_time_sec) {
 482   // We only need to do this here as the policy will only be applied
 483   // to the GC we're about to start. so, no point is calculating this
 484   // every time we calculate / recalculate the target young length.
 485   update_survivors_policy();
 486 
 487   assert(max_survivor_regions() + _g1h->num_used_regions() <= _g1h->max_regions(),
 488          "Maximum survivor regions %u plus used regions %u exceeds max regions %u",
 489          max_survivor_regions(), _g1h->num_used_regions(), _g1h->max_regions());
 490   assert_used_and_recalculate_used_equal(_g1h);
 491 
 492   phase_times()->record_cur_collection_start_sec(start_time_sec);
 493   size_t pending_cards = _g1h->pending_card_num();
 494   assert(!G1FastWriteBarrier || pending_cards == 0, "non-zero pending cards");
 495   _pending_cards = pending_cards;
 496 
 497   _collection_set->reset_bytes_used_before();
 498   _bytes_copied_during_gc = 0;
 499 
 500   // do that for any other surv rate groups
 501   _short_lived_surv_rate_group->stop_adding_regions();
 502   _survivors_age_table.clear();
 503 
 504   assert(_g1h->collection_set()->verify_young_ages(), "region age verification failed");
 505 }
 506 
 507 void G1Policy::record_concurrent_mark_init_end(double mark_init_elapsed_time_ms) {
 508   assert(!collector_state()->initiate_conc_mark_if_possible(), "we should have cleared it by now");
 509   collector_state()->set_in_initial_mark_gc(false);
 510 }
 511 
 512 void G1Policy::record_concurrent_mark_remark_start() {
 513   _mark_remark_start_sec = os::elapsedTime();
 514 }
 515 


< prev index next >