< prev index next >

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

Print this page
rev 49482 : imported patch 8035557-pause-time-predictions
rev 49483 : [mq]: 8035557-pause-time-predictions-cleanup
rev 49484 : imported patch 8197573-remove-secondary-free-list
rev 49494 : imported patch 8199742-collectorstate-fixes
rev 49495 : imported patch 8199742-stefanj-review
rev 49498 : imported patch 8200234-g1concurrentmark-refactorings


 422 }
 423 
 424 void G1Policy::record_full_collection_end() {
 425   // Consider this like a collection pause for the purposes of allocation
 426   // since last pause.
 427   double end_sec = os::elapsedTime();
 428   double full_gc_time_sec = end_sec - _full_collection_start_sec;
 429   double full_gc_time_ms = full_gc_time_sec * 1000.0;
 430 
 431   _analytics->update_recent_gc_times(end_sec, full_gc_time_ms);
 432 
 433   collector_state()->set_in_full_gc(false);
 434 
 435   // "Nuke" the heuristics that control the young/mixed GC
 436   // transitions and make sure we start with young GCs after the Full GC.
 437   collector_state()->set_in_young_only_phase(true);
 438   collector_state()->set_in_young_gc_before_mixed(false);
 439   collector_state()->set_initiate_conc_mark_if_possible(need_to_start_conc_mark("end of Full GC", 0));
 440   collector_state()->set_in_initial_mark_gc(false);
 441   collector_state()->set_mark_or_rebuild_in_progress(false);

 442 
 443   _short_lived_surv_rate_group->start_adding_regions();
 444   // also call this on any additional surv rate groups
 445 
 446   _free_regions_at_end_of_collection = _g1->num_free_regions();
 447   // Reset survivors SurvRateGroup.
 448   _survivor_surv_rate_group->reset();
 449   update_young_list_max_and_target_length();
 450   update_rs_lengths_prediction();
 451 
 452   _bytes_allocated_in_old_since_last_gc = 0;
 453 
 454   record_pause(FullGC, _full_collection_start_sec, end_sec);
 455 }
 456 
 457 void G1Policy::record_collection_pause_start(double start_time_sec) {
 458   // We only need to do this here as the policy will only be applied
 459   // to the GC we're about to start. so, no point is calculating this
 460   // every time we calculate / recalculate the target young length.
 461   update_survivors_policy();




 422 }
 423 
 424 void G1Policy::record_full_collection_end() {
 425   // Consider this like a collection pause for the purposes of allocation
 426   // since last pause.
 427   double end_sec = os::elapsedTime();
 428   double full_gc_time_sec = end_sec - _full_collection_start_sec;
 429   double full_gc_time_ms = full_gc_time_sec * 1000.0;
 430 
 431   _analytics->update_recent_gc_times(end_sec, full_gc_time_ms);
 432 
 433   collector_state()->set_in_full_gc(false);
 434 
 435   // "Nuke" the heuristics that control the young/mixed GC
 436   // transitions and make sure we start with young GCs after the Full GC.
 437   collector_state()->set_in_young_only_phase(true);
 438   collector_state()->set_in_young_gc_before_mixed(false);
 439   collector_state()->set_initiate_conc_mark_if_possible(need_to_start_conc_mark("end of Full GC", 0));
 440   collector_state()->set_in_initial_mark_gc(false);
 441   collector_state()->set_mark_or_rebuild_in_progress(false);
 442   collector_state()->set_clearing_next_bitmap(false);
 443 
 444   _short_lived_surv_rate_group->start_adding_regions();
 445   // also call this on any additional surv rate groups
 446 
 447   _free_regions_at_end_of_collection = _g1->num_free_regions();
 448   // Reset survivors SurvRateGroup.
 449   _survivor_surv_rate_group->reset();
 450   update_young_list_max_and_target_length();
 451   update_rs_lengths_prediction();
 452 
 453   _bytes_allocated_in_old_since_last_gc = 0;
 454 
 455   record_pause(FullGC, _full_collection_start_sec, end_sec);
 456 }
 457 
 458 void G1Policy::record_collection_pause_start(double start_time_sec) {
 459   // We only need to do this here as the policy will only be applied
 460   // to the GC we're about to start. so, no point is calculating this
 461   // every time we calculate / recalculate the target young length.
 462   update_survivors_policy();


< prev index next >