1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp Tue Nov 23 13:22:55 2010 -0800 1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp Tue Aug 24 17:24:33 2010 -0400 1.3 @@ -993,11 +993,6 @@ 1.4 void record_before_bytes(size_t bytes); 1.5 void record_after_bytes(size_t bytes); 1.6 1.7 - // Returns "true" if this is a good time to do a collection pause. 1.8 - // The "word_size" argument, if non-zero, indicates the size of an 1.9 - // allocation request that is prompting this query. 1.10 - virtual bool should_do_collection_pause(size_t word_size) = 0; 1.11 - 1.12 // Choose a new collection set. Marks the chosen regions as being 1.13 // "in_collection_set", and links them together. The head and number of 1.14 // the collection set are available via access methods. 1.15 @@ -1116,7 +1111,16 @@ 1.16 // do that for any other surv rate groups 1.17 } 1.18 1.19 - bool should_add_next_region_to_young_list(); 1.20 + bool is_young_list_full() { 1.21 + size_t young_list_length = _g1->young_list()->length(); 1.22 + size_t young_list_max_length = _young_list_target_length; 1.23 + if (G1FixedEdenSize) { 1.24 + young_list_max_length -= _max_survivor_regions; 1.25 + } 1.26 + 1.27 + return young_list_length >= young_list_max_length; 1.28 + } 1.29 + void update_region_num(bool young); 1.30 1.31 bool in_young_gc_mode() { 1.32 return _in_young_gc_mode; 1.33 @@ -1270,7 +1274,6 @@ 1.34 _collectionSetChooser = new CollectionSetChooser(); 1.35 } 1.36 void record_collection_pause_end(); 1.37 - bool should_do_collection_pause(size_t word_size); 1.38 // This is not needed any more, after the CSet choosing code was 1.39 // changed to use the pause prediction work. But let's leave the 1.40 // hook in just in case.