hotspot/src/share/vm/runtime/arguments.cpp
changeset 24424 2658d7834c6e
parent 24338 bff6fc677861
child 24429 4efc66ee325c
child 24440 7c472e3e3c57
equal deleted inserted replaced
24358:8528b67f6562 24424:2658d7834c6e
   850 void Arguments::print_jvm_flags_on(outputStream* st) {
   850 void Arguments::print_jvm_flags_on(outputStream* st) {
   851   if (_num_jvm_flags > 0) {
   851   if (_num_jvm_flags > 0) {
   852     for (int i=0; i < _num_jvm_flags; i++) {
   852     for (int i=0; i < _num_jvm_flags; i++) {
   853       st->print("%s ", _jvm_flags_array[i]);
   853       st->print("%s ", _jvm_flags_array[i]);
   854     }
   854     }
   855     st->print_cr("");
   855     st->cr();
   856   }
   856   }
   857 }
   857 }
   858 
   858 
   859 void Arguments::print_jvm_args_on(outputStream* st) {
   859 void Arguments::print_jvm_args_on(outputStream* st) {
   860   if (_num_jvm_args > 0) {
   860   if (_num_jvm_args > 0) {
   861     for (int i=0; i < _num_jvm_args; i++) {
   861     for (int i=0; i < _num_jvm_args; i++) {
   862       st->print("%s ", _jvm_args_array[i]);
   862       st->print("%s ", _jvm_args_array[i]);
   863     }
   863     }
   864     st->print_cr("");
   864     st->cr();
   865   }
   865   }
   866 }
   866 }
   867 
   867 
   868 bool Arguments::process_argument(const char* arg,
   868 bool Arguments::process_argument(const char* arg,
   869     jboolean ignore_unrecognized, Flag::Flags origin) {
   869     jboolean ignore_unrecognized, Flag::Flags origin) {
  1347   if (!FLAG_IS_DEFAULT(CMSParPromoteBlocksToClaim) || !FLAG_IS_DEFAULT(OldPLABWeight)) {
  1347   if (!FLAG_IS_DEFAULT(CMSParPromoteBlocksToClaim) || !FLAG_IS_DEFAULT(OldPLABWeight)) {
  1348     CFLS_LAB::modify_initialization(OldPLABSize, OldPLABWeight);
  1348     CFLS_LAB::modify_initialization(OldPLABSize, OldPLABWeight);
  1349   }
  1349   }
  1350   if (PrintGCDetails && Verbose) {
  1350   if (PrintGCDetails && Verbose) {
  1351     tty->print_cr("MarkStackSize: %uk  MarkStackSizeMax: %uk",
  1351     tty->print_cr("MarkStackSize: %uk  MarkStackSizeMax: %uk",
  1352       MarkStackSize / K, MarkStackSizeMax / K);
  1352       (unsigned int) (MarkStackSize / K), (uint) (MarkStackSizeMax / K));
  1353     tty->print_cr("ConcGCThreads: %u", ConcGCThreads);
  1353     tty->print_cr("ConcGCThreads: %u", (uint) ConcGCThreads);
  1354   }
  1354   }
  1355 }
  1355 }
  1356 #endif // INCLUDE_ALL_GCS
  1356 #endif // INCLUDE_ALL_GCS
  1357 
  1357 
  1358 void set_object_alignment() {
  1358 void set_object_alignment() {
  1428       !FLAG_IS_DEFAULT(MaxGCPauseMillis) &&
  1428       !FLAG_IS_DEFAULT(MaxGCPauseMillis) &&
  1429       (MaxGCPauseMillis <= AutoGCSelectPauseMillis)) {
  1429       (MaxGCPauseMillis <= AutoGCSelectPauseMillis)) {
  1430     if (PrintGCDetails) {
  1430     if (PrintGCDetails) {
  1431       // Cannot use gclog_or_tty yet.
  1431       // Cannot use gclog_or_tty yet.
  1432       tty->print_cr("Automatic selection of the low pause collector"
  1432       tty->print_cr("Automatic selection of the low pause collector"
  1433        " based on pause goal of %d (ms)", MaxGCPauseMillis);
  1433        " based on pause goal of %d (ms)", (int) MaxGCPauseMillis);
  1434     }
  1434     }
  1435     return true;
  1435     return true;
  1436   }
  1436   }
  1437   return false;
  1437   return false;
  1438 }
  1438 }
  1645     FLAG_SET_DEFAULT(GCTimeRatio, 9);
  1645     FLAG_SET_DEFAULT(GCTimeRatio, 9);
  1646   }
  1646   }
  1647 
  1647 
  1648   if (PrintGCDetails && Verbose) {
  1648   if (PrintGCDetails && Verbose) {
  1649     tty->print_cr("MarkStackSize: %uk  MarkStackSizeMax: %uk",
  1649     tty->print_cr("MarkStackSize: %uk  MarkStackSizeMax: %uk",
  1650       MarkStackSize / K, MarkStackSizeMax / K);
  1650       (unsigned int) (MarkStackSize / K), (uint) (MarkStackSizeMax / K));
  1651     tty->print_cr("ConcGCThreads: %u", ConcGCThreads);
  1651     tty->print_cr("ConcGCThreads: %u", (uint) ConcGCThreads);
  1652   }
  1652   }
  1653 }
  1653 }
  1654 
  1654 
  1655 julong Arguments::limit_by_allocatable_memory(julong limit) {
  1655 julong Arguments::limit_by_allocatable_memory(julong limit) {
  1656   julong max_allocatable;
  1656   julong max_allocatable;
  1730       reasonable_max = MAX2(reasonable_max, (julong)InitialHeapSize);
  1730       reasonable_max = MAX2(reasonable_max, (julong)InitialHeapSize);
  1731     }
  1731     }
  1732 
  1732 
  1733     if (PrintGCDetails && Verbose) {
  1733     if (PrintGCDetails && Verbose) {
  1734       // Cannot use gclog_or_tty yet.
  1734       // Cannot use gclog_or_tty yet.
  1735       tty->print_cr("  Maximum heap size " SIZE_FORMAT, reasonable_max);
  1735       tty->print_cr("  Maximum heap size " SIZE_FORMAT, (size_t) reasonable_max);
  1736     }
  1736     }
  1737     FLAG_SET_ERGO(uintx, MaxHeapSize, (uintx)reasonable_max);
  1737     FLAG_SET_ERGO(uintx, MaxHeapSize, (uintx)reasonable_max);
  1738   }
  1738   }
  1739 
  1739 
  1740   // If the minimum or initial heap_size have not been set or requested to be set
  1740   // If the minimum or initial heap_size have not been set or requested to be set
  2103 
  2103 
  2104   {
  2104   {
  2105     // Using "else if" below to avoid printing two error messages if min > max.
  2105     // Using "else if" below to avoid printing two error messages if min > max.
  2106     // This will also prevent us from reporting both min>100 and max>100 at the
  2106     // This will also prevent us from reporting both min>100 and max>100 at the
  2107     // same time, but that is less annoying than printing two identical errors IMHO.
  2107     // same time, but that is less annoying than printing two identical errors IMHO.
  2108     FormatBuffer<80> err_msg("");
  2108     FormatBuffer<80> err_msg("%s","");
  2109     if (!verify_MinHeapFreeRatio(err_msg, MinHeapFreeRatio)) {
  2109     if (!verify_MinHeapFreeRatio(err_msg, MinHeapFreeRatio)) {
  2110       jio_fprintf(defaultStream::error_stream(), "%s\n", err_msg.buffer());
  2110       jio_fprintf(defaultStream::error_stream(), "%s\n", err_msg.buffer());
  2111       status = false;
  2111       status = false;
  2112     } else if (!verify_MaxHeapFreeRatio(err_msg, MaxHeapFreeRatio)) {
  2112     } else if (!verify_MaxHeapFreeRatio(err_msg, MaxHeapFreeRatio)) {
  2113       jio_fprintf(defaultStream::error_stream(), "%s\n", err_msg.buffer());
  2113       jio_fprintf(defaultStream::error_stream(), "%s\n", err_msg.buffer());