< prev index next >

src/share/vm/runtime/arguments.cpp

Print this page




2642         !match_option(option, "-Dsun.java.launcher", &tail)) {
2643 
2644         // add all jvm options to the jvm_args string. This string
2645         // is used later to set the java.vm.args PerfData string constant.
2646         // the -Djava.class.path and the -Dsun.java.command options are
2647         // omitted from jvm_args string as each have their own PerfData
2648         // string constant object.
2649         build_jvm_args(option->optionString);
2650     }
2651 
2652     // -verbose:[class/gc/jni]
2653     if (match_option(option, "-verbose", &tail)) {
2654       if (!strcmp(tail, ":class") || !strcmp(tail, "")) {
2655         if (FLAG_SET_CMDLINE(bool, TraceClassLoading, true) != Flag::SUCCESS) {
2656           return JNI_EINVAL;
2657         }
2658         if (FLAG_SET_CMDLINE(bool, TraceClassUnloading, true) != Flag::SUCCESS) {
2659           return JNI_EINVAL;
2660         }
2661       } else if (!strcmp(tail, ":gc")) {
2662         // LogConfiguration_lock is not set up yet, but this code is executed by a single thread
2663         bool ret = LogConfiguration::parse_log_arguments("stdout", "gc", NULL, NULL, NULL);
2664         if (!ret) {
2665           return JNI_EINVAL;
2666         }
2667       } else if (!strcmp(tail, ":jni")) {
2668         if (FLAG_SET_CMDLINE(bool, PrintJNIResolving, true) != Flag::SUCCESS) {
2669           return JNI_EINVAL;
2670         }
2671       }
2672     // -da / -ea / -disableassertions / -enableassertions
2673     // These accept an optional class/package name separated by a colon, e.g.,
2674     // -da:java.lang.Thread.
2675     } else if (match_option(option, user_assertion_options, &tail, true)) {
2676       bool enable = option->optionString[1] == 'e';     // char after '-' is 'e'
2677       if (*tail == '\0') {
2678         JavaAssertions::setUserClassDefault(enable);
2679       } else {
2680         assert(*tail == ':', "bogus match by match_option()");
2681         JavaAssertions::addOption(tail + 1, enable);
2682       }
2683     // -dsa / -esa / -disablesystemassertions / -enablesystemassertions
2684     } else if (match_option(option, system_assertion_options, &tail, false)) {
2685       bool enable = option->optionString[1] == 'e';     // char after '-' is 'e'
2686       JavaAssertions::setSystemClassDefault(enable);




2642         !match_option(option, "-Dsun.java.launcher", &tail)) {
2643 
2644         // add all jvm options to the jvm_args string. This string
2645         // is used later to set the java.vm.args PerfData string constant.
2646         // the -Djava.class.path and the -Dsun.java.command options are
2647         // omitted from jvm_args string as each have their own PerfData
2648         // string constant object.
2649         build_jvm_args(option->optionString);
2650     }
2651 
2652     // -verbose:[class/gc/jni]
2653     if (match_option(option, "-verbose", &tail)) {
2654       if (!strcmp(tail, ":class") || !strcmp(tail, "")) {
2655         if (FLAG_SET_CMDLINE(bool, TraceClassLoading, true) != Flag::SUCCESS) {
2656           return JNI_EINVAL;
2657         }
2658         if (FLAG_SET_CMDLINE(bool, TraceClassUnloading, true) != Flag::SUCCESS) {
2659           return JNI_EINVAL;
2660         }
2661       } else if (!strcmp(tail, ":gc")) {
2662         LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(gc));




2663       } else if (!strcmp(tail, ":jni")) {
2664         if (FLAG_SET_CMDLINE(bool, PrintJNIResolving, true) != Flag::SUCCESS) {
2665           return JNI_EINVAL;
2666         }
2667       }
2668     // -da / -ea / -disableassertions / -enableassertions
2669     // These accept an optional class/package name separated by a colon, e.g.,
2670     // -da:java.lang.Thread.
2671     } else if (match_option(option, user_assertion_options, &tail, true)) {
2672       bool enable = option->optionString[1] == 'e';     // char after '-' is 'e'
2673       if (*tail == '\0') {
2674         JavaAssertions::setUserClassDefault(enable);
2675       } else {
2676         assert(*tail == ':', "bogus match by match_option()");
2677         JavaAssertions::addOption(tail + 1, enable);
2678       }
2679     // -dsa / -esa / -disablesystemassertions / -enablesystemassertions
2680     } else if (match_option(option, system_assertion_options, &tail, false)) {
2681       bool enable = option->optionString[1] == 'e';     // char after '-' is 'e'
2682       JavaAssertions::setSystemClassDefault(enable);


< prev index next >