< prev index next >

src/hotspot/share/gc/shared/genArguments.cpp

Print this page




 179       // HeapAlignment, and we just made sure that NewSize is aligned to
 180       // GenAlignment. In initialize_flags() we verified that HeapAlignment
 181       // is a multiple of GenAlignment.
 182       FLAG_SET_ERGO(OldSize, MaxHeapSize - NewSize);
 183     } else {
 184       FLAG_SET_ERGO(MaxHeapSize, align_up(NewSize + OldSize, HeapAlignment));
 185     }
 186   }
 187 
 188   // Update NewSize, if possible, to avoid sizing the young gen too small when only
 189   // OldSize is set on the command line.
 190   if (FLAG_IS_CMDLINE(OldSize) && !FLAG_IS_CMDLINE(NewSize)) {
 191     if (OldSize < InitialHeapSize) {
 192       size_t new_size = InitialHeapSize - OldSize;
 193       if (new_size >= MinNewSize && new_size <= MaxNewSize) {
 194         FLAG_SET_ERGO(NewSize, new_size);
 195       }
 196     }
 197   }
 198 
 199   always_do_update_barrier = UseConcMarkSweepGC;
 200 
 201   DEBUG_ONLY(assert_flags();)
 202 }
 203 
 204 // Values set on the command line win over any ergonomically
 205 // set command line parameters.
 206 // Ergonomic choice of parameters are done before this
 207 // method is called.  Values for command line parameters such as NewSize
 208 // and MaxNewSize feed those ergonomic choices into this method.
 209 // This method makes the final generation sizings consistent with
 210 // themselves and with overall heap sizings.
 211 // In the absence of explicitly set command line flags, policies
 212 // such as the use of NewRatio are used to size the generation.
 213 
 214 // Minimum sizes of the generations may be different than
 215 // the initial sizes.  An inconsistency is permitted here
 216 // in the total size that can be specified explicitly by
 217 // command line specification of OldSize and NewSize and
 218 // also a command line specification of -Xms.  Issue a warning
 219 // but allow the values to pass.
 220 void GenArguments::initialize_size_info() {




 179       // HeapAlignment, and we just made sure that NewSize is aligned to
 180       // GenAlignment. In initialize_flags() we verified that HeapAlignment
 181       // is a multiple of GenAlignment.
 182       FLAG_SET_ERGO(OldSize, MaxHeapSize - NewSize);
 183     } else {
 184       FLAG_SET_ERGO(MaxHeapSize, align_up(NewSize + OldSize, HeapAlignment));
 185     }
 186   }
 187 
 188   // Update NewSize, if possible, to avoid sizing the young gen too small when only
 189   // OldSize is set on the command line.
 190   if (FLAG_IS_CMDLINE(OldSize) && !FLAG_IS_CMDLINE(NewSize)) {
 191     if (OldSize < InitialHeapSize) {
 192       size_t new_size = InitialHeapSize - OldSize;
 193       if (new_size >= MinNewSize && new_size <= MaxNewSize) {
 194         FLAG_SET_ERGO(NewSize, new_size);
 195       }
 196     }
 197   }
 198 


 199   DEBUG_ONLY(assert_flags();)
 200 }
 201 
 202 // Values set on the command line win over any ergonomically
 203 // set command line parameters.
 204 // Ergonomic choice of parameters are done before this
 205 // method is called.  Values for command line parameters such as NewSize
 206 // and MaxNewSize feed those ergonomic choices into this method.
 207 // This method makes the final generation sizings consistent with
 208 // themselves and with overall heap sizings.
 209 // In the absence of explicitly set command line flags, policies
 210 // such as the use of NewRatio are used to size the generation.
 211 
 212 // Minimum sizes of the generations may be different than
 213 // the initial sizes.  An inconsistency is permitted here
 214 // in the total size that can be specified explicitly by
 215 // command line specification of OldSize and NewSize and
 216 // also a command line specification of -Xms.  Issue a warning
 217 // but allow the values to pass.
 218 void GenArguments::initialize_size_info() {


< prev index next >