src/share/vm/runtime/arguments.cpp

Print this page
rev 2110 : [mq]: is-debugger-present


1646 // Parsing of java.compiler property
1647 
1648 void Arguments::process_java_compiler_argument(char* arg) {
1649   // For backwards compatibility, Djava.compiler=NONE or ""
1650   // causes us to switch to -Xint mode UNLESS -Xdebug
1651   // is also specified.
1652   if (strlen(arg) == 0 || strcasecmp(arg, "NONE") == 0) {
1653     set_java_compiler(true);    // "-Djava.compiler[=...]" most recently seen.
1654   }
1655 }
1656 
1657 void Arguments::process_java_launcher_argument(const char* launcher, void* extra_info) {
1658   _sun_java_launcher = strdup(launcher);
1659 }
1660 
1661 bool Arguments::created_by_java_launcher() {
1662   assert(_sun_java_launcher != NULL, "property must have value");
1663   return strcmp(DEFAULT_JAVA_LAUNCHER, _sun_java_launcher) != 0;
1664 }
1665 





1666 //===========================================================================================================
1667 // Parsing of main arguments
1668 
1669 bool Arguments::verify_interval(uintx val, uintx min,
1670                                 uintx max, const char* name) {
1671   // Returns true iff value is in the inclusive interval [min..max]
1672   // false, otherwise.
1673   if (val >= min && val <= max) {
1674     return true;
1675   }
1676   jio_fprintf(defaultStream::error_stream(),
1677               "%s of " UINTX_FORMAT " is invalid; must be between " UINTX_FORMAT
1678               " and " UINTX_FORMAT "\n",
1679               name, val, min, max);
1680   return false;
1681 }
1682 
1683 bool Arguments::verify_min_value(intx val, intx min, const char* name) {
1684   // Returns true if given value is greater than specified min threshold
1685   // false, otherwise.




1646 // Parsing of java.compiler property
1647 
1648 void Arguments::process_java_compiler_argument(char* arg) {
1649   // For backwards compatibility, Djava.compiler=NONE or ""
1650   // causes us to switch to -Xint mode UNLESS -Xdebug
1651   // is also specified.
1652   if (strlen(arg) == 0 || strcasecmp(arg, "NONE") == 0) {
1653     set_java_compiler(true);    // "-Djava.compiler[=...]" most recently seen.
1654   }
1655 }
1656 
1657 void Arguments::process_java_launcher_argument(const char* launcher, void* extra_info) {
1658   _sun_java_launcher = strdup(launcher);
1659 }
1660 
1661 bool Arguments::created_by_java_launcher() {
1662   assert(_sun_java_launcher != NULL, "property must have value");
1663   return strcmp(DEFAULT_JAVA_LAUNCHER, _sun_java_launcher) != 0;
1664 }
1665 
1666 bool Arguments::created_by_gamma_launcher() {
1667   assert(_sun_java_launcher != NULL, "property must have value");
1668   return strcmp("gamma", _sun_java_launcher) == 0;
1669 }
1670 
1671 //===========================================================================================================
1672 // Parsing of main arguments
1673 
1674 bool Arguments::verify_interval(uintx val, uintx min,
1675                                 uintx max, const char* name) {
1676   // Returns true iff value is in the inclusive interval [min..max]
1677   // false, otherwise.
1678   if (val >= min && val <= max) {
1679     return true;
1680   }
1681   jio_fprintf(defaultStream::error_stream(),
1682               "%s of " UINTX_FORMAT " is invalid; must be between " UINTX_FORMAT
1683               " and " UINTX_FORMAT "\n",
1684               name, val, min, max);
1685   return false;
1686 }
1687 
1688 bool Arguments::verify_min_value(intx val, intx min, const char* name) {
1689   // Returns true if given value is greater than specified min threshold
1690   // false, otherwise.