comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp @ 4912:a9647476d1a4

7132029: G1: mixed GC phase lasts for longer than it should Summary: Revamp of the mechanism that chooses old regions for inclusion in the CSet. It simplifies the code and introduces min and max bounds on the number of old regions added to the CSet at each mixed GC to avoid pathological cases. It also ensures that when we do a mixed GC we'll always find old regions to add to the CSet (i.e., it eliminates the case where a mixed GC will collect no old regions which can happen today). Reviewed-by: johnc, brutisso
author tonyp
date Wed, 15 Feb 2012 13:06:53 -0500
parents caa4652b4414
children 748051fd24ce
comparison
equal deleted inserted replaced
4911:d903bf750e9f 4912:a9647476d1a4
1180 void set_free_regions_coming(); 1180 void set_free_regions_coming();
1181 void reset_free_regions_coming(); 1181 void reset_free_regions_coming();
1182 bool free_regions_coming() { return _free_regions_coming; } 1182 bool free_regions_coming() { return _free_regions_coming; }
1183 void wait_while_free_regions_coming(); 1183 void wait_while_free_regions_coming();
1184 1184
1185 // Determine whether the given region is one that we are using as an
1186 // old GC alloc region.
1187 bool is_old_gc_alloc_region(HeapRegion* hr) {
1188 return hr == _retained_old_gc_alloc_region;
1189 }
1190
1185 // Perform a collection of the heap; intended for use in implementing 1191 // Perform a collection of the heap; intended for use in implementing
1186 // "System.gc". This probably implies as full a collection as the 1192 // "System.gc". This probably implies as full a collection as the
1187 // "CollectedHeap" supports. 1193 // "CollectedHeap" supports.
1188 virtual void collect(GCCause::Cause cause); 1194 virtual void collect(GCCause::Cause cause);
1189 1195
1660 HeapRegion* pop_dirty_cards_region(); 1666 HeapRegion* pop_dirty_cards_region();
1661 1667
1662 public: 1668 public:
1663 void stop_conc_gc_threads(); 1669 void stop_conc_gc_threads();
1664 1670
1665 double predict_region_elapsed_time_ms(HeapRegion* hr, bool young);
1666 void check_if_region_is_too_expensive(double predicted_time_ms);
1667 size_t pending_card_num(); 1671 size_t pending_card_num();
1668 size_t max_pending_card_num(); 1672 size_t max_pending_card_num();
1669 size_t cards_scanned(); 1673 size_t cards_scanned();
1670 1674
1671 protected: 1675 protected: