< prev index next >

src/hotspot/share/runtime/arguments.cpp

Print this page




3194       jio_fprintf(defaultStream::error_stream(),
3195                   "ExtendedDTraceProbes flag is not applicable for this configuration\n");
3196       return JNI_EINVAL;
3197 #endif // defined(DTRACE_ENABLED)
3198 #ifdef ASSERT
3199     } else if (match_option(option, "-XX:+FullGCALot")) {
3200       if (FLAG_SET_CMDLINE(bool, FullGCALot, true) != Flag::SUCCESS) {
3201         return JNI_EINVAL;
3202       }
3203       // disable scavenge before parallel mark-compact
3204       if (FLAG_SET_CMDLINE(bool, ScavengeBeforeFullGC, false) != Flag::SUCCESS) {
3205         return JNI_EINVAL;
3206       }
3207 #endif
3208 #if !INCLUDE_MANAGEMENT
3209     } else if (match_option(option, "-XX:+ManagementServer")) {
3210         jio_fprintf(defaultStream::error_stream(),
3211           "ManagementServer is not supported in this VM.\n");
3212         return JNI_ERR;
3213 #endif // INCLUDE_MANAGEMENT














3214     } else if (match_option(option, "-XX:", &tail)) { // -XX:xxxx
3215       // Skip -XX:Flags= and -XX:VMOptionsFile= since those cases have
3216       // already been handled
3217       if ((strncmp(tail, "Flags=", strlen("Flags=")) != 0) &&
3218           (strncmp(tail, "VMOptionsFile=", strlen("VMOptionsFile=")) != 0)) {
3219         if (!process_argument(tail, args->ignoreUnrecognized, origin)) {
3220           return JNI_EINVAL;
3221         }
3222       }
3223     // Unknown option
3224     } else if (is_bad_option(option, args->ignoreUnrecognized)) {
3225       return JNI_ERR;
3226     }
3227   }
3228 
3229   // PrintSharedArchiveAndExit will turn on
3230   //   -Xshare:on
3231   //   -Xlog:class+path=info
3232   if (PrintSharedArchiveAndExit) {
3233     if (FLAG_SET_CMDLINE(bool, UseSharedSpaces, true) != Flag::SUCCESS) {




3194       jio_fprintf(defaultStream::error_stream(),
3195                   "ExtendedDTraceProbes flag is not applicable for this configuration\n");
3196       return JNI_EINVAL;
3197 #endif // defined(DTRACE_ENABLED)
3198 #ifdef ASSERT
3199     } else if (match_option(option, "-XX:+FullGCALot")) {
3200       if (FLAG_SET_CMDLINE(bool, FullGCALot, true) != Flag::SUCCESS) {
3201         return JNI_EINVAL;
3202       }
3203       // disable scavenge before parallel mark-compact
3204       if (FLAG_SET_CMDLINE(bool, ScavengeBeforeFullGC, false) != Flag::SUCCESS) {
3205         return JNI_EINVAL;
3206       }
3207 #endif
3208 #if !INCLUDE_MANAGEMENT
3209     } else if (match_option(option, "-XX:+ManagementServer")) {
3210         jio_fprintf(defaultStream::error_stream(),
3211           "ManagementServer is not supported in this VM.\n");
3212         return JNI_ERR;
3213 #endif // INCLUDE_MANAGEMENT
3214     } else if (match_option(option, "-Xmanagement", &tail)) {
3215 #if INCLUDE_MANAGEMENT
3216         if (FLAG_SET_CMDLINE(bool, ManagementServer, true) != Flag::SUCCESS) {
3217           return JNI_EINVAL;
3218         }
3219         // management agent in module jdk.management.agent
3220         if (!create_numbered_property("jdk.module.addmods", "jdk.management.agent", addmods_count++)) {
3221           return JNI_ENOMEM;
3222         }
3223 #else
3224         jio_fprintf(defaultStream::output_stream(),
3225           "-Xmanagement is not supported in this VM.\n");
3226         return JNI_ERR;
3227 #endif
3228     } else if (match_option(option, "-XX:", &tail)) { // -XX:xxxx
3229       // Skip -XX:Flags= and -XX:VMOptionsFile= since those cases have
3230       // already been handled
3231       if ((strncmp(tail, "Flags=", strlen("Flags=")) != 0) &&
3232           (strncmp(tail, "VMOptionsFile=", strlen("VMOptionsFile=")) != 0)) {
3233         if (!process_argument(tail, args->ignoreUnrecognized, origin)) {
3234           return JNI_EINVAL;
3235         }
3236       }
3237     // Unknown option
3238     } else if (is_bad_option(option, args->ignoreUnrecognized)) {
3239       return JNI_ERR;
3240     }
3241   }
3242 
3243   // PrintSharedArchiveAndExit will turn on
3244   //   -Xshare:on
3245   //   -Xlog:class+path=info
3246   if (PrintSharedArchiveAndExit) {
3247     if (FLAG_SET_CMDLINE(bool, UseSharedSpaces, true) != Flag::SUCCESS) {


< prev index next >