comparison src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp @ 1088:3fc996d4edd2

6902303: G1: ScavengeALot should cause an incremental, rather than a full, collection Summary: ScavengeALot now causes an incremental (but possibly partially young, in the G1 sense) collection. Some such collections may be abandoned on account of MMU specs. Band-aided a native leak associated with abandoned pauses, as well as an MMU tracker overflow related to frequent scavenge events in the face of a large MMU denominator interval; the latter is protected by a product flag that defaults to false. Reviewed-by: tonyp
author ysr
date Thu, 19 Nov 2009 13:43:25 -0800
parents 23b9a8d315fc
children 44f61c24ddab
comparison
equal deleted inserted replaced
1087:23b9a8d315fc 1088:3fc996d4edd2
2845 G1CollectorPolicy_BestRegionsFirst:: 2845 G1CollectorPolicy_BestRegionsFirst::
2846 choose_collection_set() { 2846 choose_collection_set() {
2847 double non_young_start_time_sec; 2847 double non_young_start_time_sec;
2848 start_recording_regions(); 2848 start_recording_regions();
2849 2849
2850 guarantee(_target_pause_time_ms > -1.0, 2850 guarantee(_target_pause_time_ms > -1.0
2851 NOT_PRODUCT(|| Universe::heap()->gc_cause() == GCCause::_scavenge_alot),
2851 "_target_pause_time_ms should have been set!"); 2852 "_target_pause_time_ms should have been set!");
2853 #ifndef PRODUCT
2854 if (_target_pause_time_ms <= -1.0) {
2855 assert(ScavengeALot && Universe::heap()->gc_cause() == GCCause::_scavenge_alot, "Error");
2856 _target_pause_time_ms = _mmu_tracker->max_gc_time() * 1000.0;
2857 }
2858 #endif
2852 assert(_collection_set == NULL, "Precondition"); 2859 assert(_collection_set == NULL, "Precondition");
2853 2860
2854 double base_time_ms = predict_base_elapsed_time_ms(_pending_cards); 2861 double base_time_ms = predict_base_elapsed_time_ms(_pending_cards);
2855 double predicted_pause_time_ms = base_time_ms; 2862 double predicted_pause_time_ms = base_time_ms;
2856 2863
2992 void G1CollectorPolicy_BestRegionsFirst:: 2999 void G1CollectorPolicy_BestRegionsFirst::
2993 record_collection_pause_end(bool abandoned) { 3000 record_collection_pause_end(bool abandoned) {
2994 G1CollectorPolicy::record_collection_pause_end(abandoned); 3001 G1CollectorPolicy::record_collection_pause_end(abandoned);
2995 assert(assertMarkedBytesDataOK(), "Marked regions not OK at pause end."); 3002 assert(assertMarkedBytesDataOK(), "Marked regions not OK at pause end.");
2996 } 3003 }
2997
2998 // Local Variables: ***
2999 // c-indentation-style: gnu ***
3000 // End: ***