1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp Wed Apr 11 16:18:45 2012 +0200 1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp Wed Apr 18 07:21:15 2012 -0400 1.3 @@ -128,19 +128,19 @@ 1.4 SizerNewRatio 1.5 }; 1.6 SizerKind _sizer_kind; 1.7 - size_t _min_desired_young_length; 1.8 - size_t _max_desired_young_length; 1.9 + uint _min_desired_young_length; 1.10 + uint _max_desired_young_length; 1.11 bool _adaptive_size; 1.12 - size_t calculate_default_min_length(size_t new_number_of_heap_regions); 1.13 - size_t calculate_default_max_length(size_t new_number_of_heap_regions); 1.14 + uint calculate_default_min_length(uint new_number_of_heap_regions); 1.15 + uint calculate_default_max_length(uint new_number_of_heap_regions); 1.16 1.17 public: 1.18 G1YoungGenSizer(); 1.19 - void heap_size_changed(size_t new_number_of_heap_regions); 1.20 - size_t min_desired_young_length() { 1.21 + void heap_size_changed(uint new_number_of_heap_regions); 1.22 + uint min_desired_young_length() { 1.23 return _min_desired_young_length; 1.24 } 1.25 - size_t max_desired_young_length() { 1.26 + uint max_desired_young_length() { 1.27 return _max_desired_young_length; 1.28 } 1.29 bool adaptive_young_list_length() { 1.30 @@ -175,7 +175,7 @@ 1.31 1.32 double _cur_collection_start_sec; 1.33 size_t _cur_collection_pause_used_at_start_bytes; 1.34 - size_t _cur_collection_pause_used_regions_at_start; 1.35 + uint _cur_collection_pause_used_regions_at_start; 1.36 double _cur_collection_par_time_ms; 1.37 1.38 double _cur_collection_code_root_fixup_time_ms; 1.39 @@ -233,13 +233,13 @@ 1.40 // indicates whether we are in young or mixed GC mode 1.41 bool _gcs_are_young; 1.42 1.43 - size_t _young_list_target_length; 1.44 - size_t _young_list_fixed_length; 1.45 + uint _young_list_target_length; 1.46 + uint _young_list_fixed_length; 1.47 size_t _prev_eden_capacity; // used for logging 1.48 1.49 // The max number of regions we can extend the eden by while the GC 1.50 // locker is active. This should be >= _young_list_target_length; 1.51 - size_t _young_list_max_length; 1.52 + uint _young_list_max_length; 1.53 1.54 bool _last_gc_was_young; 1.55 1.56 @@ -257,7 +257,7 @@ 1.57 double _gc_overhead_perc; 1.58 1.59 double _reserve_factor; 1.60 - size_t _reserve_regions; 1.61 + uint _reserve_regions; 1.62 1.63 bool during_marking() { 1.64 return _during_marking; 1.65 @@ -292,18 +292,18 @@ 1.66 1.67 G1YoungGenSizer* _young_gen_sizer; 1.68 1.69 - size_t _eden_cset_region_length; 1.70 - size_t _survivor_cset_region_length; 1.71 - size_t _old_cset_region_length; 1.72 + uint _eden_cset_region_length; 1.73 + uint _survivor_cset_region_length; 1.74 + uint _old_cset_region_length; 1.75 1.76 - void init_cset_region_lengths(size_t eden_cset_region_length, 1.77 - size_t survivor_cset_region_length); 1.78 + void init_cset_region_lengths(uint eden_cset_region_length, 1.79 + uint survivor_cset_region_length); 1.80 1.81 - size_t eden_cset_region_length() { return _eden_cset_region_length; } 1.82 - size_t survivor_cset_region_length() { return _survivor_cset_region_length; } 1.83 - size_t old_cset_region_length() { return _old_cset_region_length; } 1.84 + uint eden_cset_region_length() { return _eden_cset_region_length; } 1.85 + uint survivor_cset_region_length() { return _survivor_cset_region_length; } 1.86 + uint old_cset_region_length() { return _old_cset_region_length; } 1.87 1.88 - size_t _free_regions_at_end_of_collection; 1.89 + uint _free_regions_at_end_of_collection; 1.90 1.91 size_t _recorded_rs_lengths; 1.92 size_t _max_rs_lengths; 1.93 @@ -496,10 +496,10 @@ 1.94 1.95 void set_recorded_rs_lengths(size_t rs_lengths); 1.96 1.97 - size_t cset_region_length() { return young_cset_region_length() + 1.98 - old_cset_region_length(); } 1.99 - size_t young_cset_region_length() { return eden_cset_region_length() + 1.100 - survivor_cset_region_length(); } 1.101 + uint cset_region_length() { return young_cset_region_length() + 1.102 + old_cset_region_length(); } 1.103 + uint young_cset_region_length() { return eden_cset_region_length() + 1.104 + survivor_cset_region_length(); } 1.105 1.106 void record_young_free_cset_time_ms(double time_ms) { 1.107 _recorded_young_free_cset_time_ms = time_ms; 1.108 @@ -720,12 +720,12 @@ 1.109 // Calculate and return the minimum desired young list target 1.110 // length. This is the minimum desired young list length according 1.111 // to the user's inputs. 1.112 - size_t calculate_young_list_desired_min_length(size_t base_min_length); 1.113 + uint calculate_young_list_desired_min_length(uint base_min_length); 1.114 1.115 // Calculate and return the maximum desired young list target 1.116 // length. This is the maximum desired young list length according 1.117 // to the user's inputs. 1.118 - size_t calculate_young_list_desired_max_length(); 1.119 + uint calculate_young_list_desired_max_length(); 1.120 1.121 // Calculate and return the maximum young list target length that 1.122 // can fit into the pause time goal. The parameters are: rs_lengths 1.123 @@ -733,18 +733,18 @@ 1.124 // be, base_min_length is the alreay existing number of regions in 1.125 // the young list, min_length and max_length are the desired min and 1.126 // max young list length according to the user's inputs. 1.127 - size_t calculate_young_list_target_length(size_t rs_lengths, 1.128 - size_t base_min_length, 1.129 - size_t desired_min_length, 1.130 - size_t desired_max_length); 1.131 + uint calculate_young_list_target_length(size_t rs_lengths, 1.132 + uint base_min_length, 1.133 + uint desired_min_length, 1.134 + uint desired_max_length); 1.135 1.136 // Check whether a given young length (young_length) fits into the 1.137 // given target pause time and whether the prediction for the amount 1.138 // of objects to be copied for the given length will fit into the 1.139 // given free space (expressed by base_free_regions). It is used by 1.140 // calculate_young_list_target_length(). 1.141 - bool predict_will_fit(size_t young_length, double base_time_ms, 1.142 - size_t base_free_regions, double target_pause_time_ms); 1.143 + bool predict_will_fit(uint young_length, double base_time_ms, 1.144 + uint base_free_regions, double target_pause_time_ms); 1.145 1.146 // Count the number of bytes used in the CS. 1.147 void count_CS_bytes_used(); 1.148 @@ -773,7 +773,7 @@ 1.149 } 1.150 1.151 // This should be called after the heap is resized. 1.152 - void record_new_heap_size(size_t new_number_of_regions); 1.153 + void record_new_heap_size(uint new_number_of_regions); 1.154 1.155 void init(); 1.156 1.157 @@ -1048,18 +1048,18 @@ 1.158 } 1.159 1.160 bool is_young_list_full() { 1.161 - size_t young_list_length = _g1->young_list()->length(); 1.162 - size_t young_list_target_length = _young_list_target_length; 1.163 + uint young_list_length = _g1->young_list()->length(); 1.164 + uint young_list_target_length = _young_list_target_length; 1.165 return young_list_length >= young_list_target_length; 1.166 } 1.167 1.168 bool can_expand_young_list() { 1.169 - size_t young_list_length = _g1->young_list()->length(); 1.170 - size_t young_list_max_length = _young_list_max_length; 1.171 + uint young_list_length = _g1->young_list()->length(); 1.172 + uint young_list_max_length = _young_list_max_length; 1.173 return young_list_length < young_list_max_length; 1.174 } 1.175 1.176 - size_t young_list_max_length() { 1.177 + uint young_list_max_length() { 1.178 return _young_list_max_length; 1.179 } 1.180 1.181 @@ -1097,7 +1097,7 @@ 1.182 int _tenuring_threshold; 1.183 1.184 // The limit on the number of regions allocated for survivors. 1.185 - size_t _max_survivor_regions; 1.186 + uint _max_survivor_regions; 1.187 1.188 // For reporting purposes. 1.189 size_t _eden_bytes_before_gc; 1.190 @@ -1105,7 +1105,7 @@ 1.191 size_t _capacity_before_gc; 1.192 1.193 // The amount of survor regions after a collection. 1.194 - size_t _recorded_survivor_regions; 1.195 + uint _recorded_survivor_regions; 1.196 // List of survivor regions. 1.197 HeapRegion* _recorded_survivor_head; 1.198 HeapRegion* _recorded_survivor_tail; 1.199 @@ -1127,9 +1127,9 @@ 1.200 return purpose == GCAllocForSurvived; 1.201 } 1.202 1.203 - static const size_t REGIONS_UNLIMITED = ~(size_t)0; 1.204 + static const uint REGIONS_UNLIMITED = (uint) -1; 1.205 1.206 - size_t max_regions(int purpose); 1.207 + uint max_regions(int purpose); 1.208 1.209 // The limit on regions for a particular purpose is reached. 1.210 void note_alloc_region_limit_reached(int purpose) { 1.211 @@ -1146,7 +1146,7 @@ 1.212 _survivor_surv_rate_group->stop_adding_regions(); 1.213 } 1.214 1.215 - void record_survivor_regions(size_t regions, 1.216 + void record_survivor_regions(uint regions, 1.217 HeapRegion* head, 1.218 HeapRegion* tail) { 1.219 _recorded_survivor_regions = regions; 1.220 @@ -1154,12 +1154,11 @@ 1.221 _recorded_survivor_tail = tail; 1.222 } 1.223 1.224 - size_t recorded_survivor_regions() { 1.225 + uint recorded_survivor_regions() { 1.226 return _recorded_survivor_regions; 1.227 } 1.228 1.229 - void record_thread_age_table(ageTable* age_table) 1.230 - { 1.231 + void record_thread_age_table(ageTable* age_table) { 1.232 _survivors_age_table.merge_par(age_table); 1.233 } 1.234