140 // These record the most recent collection times. They 141 // are available as an alternative to using the averages 142 // for making ergonomic decisions. 143 double _latest_minor_mutator_interval_seconds; 144 145 // Allowed difference between major and minor gc times, used 146 // for computing tenuring_threshold. 147 const double _threshold_tolerance_percent; 148 149 const double _gc_pause_goal_sec; // goal for maximum gc pause 150 151 // Flag indicating that the adaptive policy is ready to use 152 bool _young_gen_policy_is_ready; 153 154 // decrease/increase the young generation for minor pause time 155 int _change_young_gen_for_min_pauses; 156 157 // decrease/increase the old generation for major pause time 158 int _change_old_gen_for_maj_pauses; 159 160 // change old geneneration for throughput 161 int _change_old_gen_for_throughput; 162 163 // change young generation for throughput 164 int _change_young_gen_for_throughput; 165 166 // Flag indicating that the policy would 167 // increase the tenuring threshold because of the total major gc cost 168 // is greater than the total minor gc cost 169 bool _increment_tenuring_threshold_for_gc_cost; 170 // decrease the tenuring threshold because of the the total minor gc 171 // cost is greater than the total major gc cost 172 bool _decrement_tenuring_threshold_for_gc_cost; 173 // decrease due to survivor size limit 174 bool _decrement_tenuring_threshold_for_survivor_limit; 175 176 // decrease generation sizes for footprint 177 int _decrease_for_footprint; 178 179 // Set if the ergonomic decisions were made at a full GC. 180 int _decide_at_full_gc; 181 182 // Changing the generation sizing depends on the data that is 183 // gathered about the effects of changes on the pause times and 184 // throughput. These variable count the number of data points 185 // gathered. The policy may use these counters as a threshhold 186 // for reliable data. 187 julong _young_gen_change_for_minor_throughput; 188 julong _old_gen_change_for_major_throughput; 189 190 static const uint GCWorkersPerJavaThread = 2; 191 192 // Accessors 193 194 double gc_pause_goal_sec() const { return _gc_pause_goal_sec; } 195 // The value returned is unitless: it's the proportion of time 196 // spent in a particular collection type. 197 // An interval time will be 0.0 if a collection type hasn't occurred yet. 198 // The 1.4.2 implementation put a floor on the values of major_gc_cost 199 // and minor_gc_cost. This was useful because of the way major_gc_cost 200 // and minor_gc_cost was used in calculating the sizes of the generations. 201 // Do not use a floor in this implementation because any finite value 202 // will put a limit on the throughput that can be achieved and any 203 // throughput goal above that limit will drive the generations sizes 204 // to extremes. 205 double major_gc_cost() const { | 140 // These record the most recent collection times. They 141 // are available as an alternative to using the averages 142 // for making ergonomic decisions. 143 double _latest_minor_mutator_interval_seconds; 144 145 // Allowed difference between major and minor gc times, used 146 // for computing tenuring_threshold. 147 const double _threshold_tolerance_percent; 148 149 const double _gc_pause_goal_sec; // goal for maximum gc pause 150 151 // Flag indicating that the adaptive policy is ready to use 152 bool _young_gen_policy_is_ready; 153 154 // decrease/increase the young generation for minor pause time 155 int _change_young_gen_for_min_pauses; 156 157 // decrease/increase the old generation for major pause time 158 int _change_old_gen_for_maj_pauses; 159 160 // change old generation for throughput 161 int _change_old_gen_for_throughput; 162 163 // change young generation for throughput 164 int _change_young_gen_for_throughput; 165 166 // Flag indicating that the policy would 167 // increase the tenuring threshold because of the total major gc cost 168 // is greater than the total minor gc cost 169 bool _increment_tenuring_threshold_for_gc_cost; 170 // decrease the tenuring threshold because of the the total minor gc 171 // cost is greater than the total major gc cost 172 bool _decrement_tenuring_threshold_for_gc_cost; 173 // decrease due to survivor size limit 174 bool _decrement_tenuring_threshold_for_survivor_limit; 175 176 // decrease generation sizes for footprint 177 int _decrease_for_footprint; 178 179 // Set if the ergonomic decisions were made at a full GC. 180 int _decide_at_full_gc; 181 182 // Changing the generation sizing depends on the data that is 183 // gathered about the effects of changes on the pause times and 184 // throughput. These variable count the number of data points 185 // gathered. The policy may use these counters as a threshold 186 // for reliable data. 187 julong _young_gen_change_for_minor_throughput; 188 julong _old_gen_change_for_major_throughput; 189 190 static const uint GCWorkersPerJavaThread = 2; 191 192 // Accessors 193 194 double gc_pause_goal_sec() const { return _gc_pause_goal_sec; } 195 // The value returned is unitless: it's the proportion of time 196 // spent in a particular collection type. 197 // An interval time will be 0.0 if a collection type hasn't occurred yet. 198 // The 1.4.2 implementation put a floor on the values of major_gc_cost 199 // and minor_gc_cost. This was useful because of the way major_gc_cost 200 // and minor_gc_cost was used in calculating the sizes of the generations. 201 // Do not use a floor in this implementation because any finite value 202 // will put a limit on the throughput that can be achieved and any 203 // throughput goal above that limit will drive the generations sizes 204 // to extremes. 205 double major_gc_cost() const { |