src/share/vm/runtime/arguments.cpp

Print this page




3283         "Please use -XX:ConcGCThreads in place of "
3284         "-XX:ParallelMarkingThreads or -XX:ParallelCMSThreads in the future\n");
3285       FLAG_SET_CMDLINE(uintx, ConcGCThreads, conc_threads);
3286     } else if (match_option(option, "-XX:MaxDirectMemorySize=", &tail)) {
3287       julong max_direct_memory_size = 0;
3288       ArgsRange errcode = parse_memory_size(tail, &max_direct_memory_size, 0);
3289       if (errcode != arg_in_range) {
3290         jio_fprintf(defaultStream::error_stream(),
3291                     "Invalid maximum direct memory size: %s\n",
3292                     option->optionString);
3293         describe_range_error(errcode);
3294         return JNI_EINVAL;
3295       }
3296       FLAG_SET_CMDLINE(uintx, MaxDirectMemorySize, max_direct_memory_size);
3297 #if !INCLUDE_MANAGEMENT
3298     } else if (match_option(option, "-XX:+ManagementServer")) {
3299         jio_fprintf(defaultStream::error_stream(),
3300           "ManagementServer is not supported in this VM.\n");
3301         return JNI_ERR;
3302 #endif // INCLUDE_MANAGEMENT









3303     } else if (match_option(option, "-XX:", &tail)) { // -XX:xxxx
3304       // Skip -XX:Flags= since that case has already been handled
3305       if (strncmp(tail, "Flags=", strlen("Flags=")) != 0) {
3306         if (!process_argument(tail, args->ignoreUnrecognized, origin)) {
3307           return JNI_EINVAL;
3308         }
3309       }
3310     // Unknown option
3311     } else if (is_bad_option(option, args->ignoreUnrecognized)) {
3312       return JNI_ERR;
3313     }
3314   }
3315 
3316   // PrintSharedArchiveAndExit will turn on
3317   //   -Xshare:on
3318   //   -XX:+TraceClassPaths
3319   if (PrintSharedArchiveAndExit) {
3320     FLAG_SET_CMDLINE(bool, UseSharedSpaces, true);
3321     FLAG_SET_CMDLINE(bool, RequireSharedSpaces, true);
3322     FLAG_SET_CMDLINE(bool, TraceClassPaths, true);




3283         "Please use -XX:ConcGCThreads in place of "
3284         "-XX:ParallelMarkingThreads or -XX:ParallelCMSThreads in the future\n");
3285       FLAG_SET_CMDLINE(uintx, ConcGCThreads, conc_threads);
3286     } else if (match_option(option, "-XX:MaxDirectMemorySize=", &tail)) {
3287       julong max_direct_memory_size = 0;
3288       ArgsRange errcode = parse_memory_size(tail, &max_direct_memory_size, 0);
3289       if (errcode != arg_in_range) {
3290         jio_fprintf(defaultStream::error_stream(),
3291                     "Invalid maximum direct memory size: %s\n",
3292                     option->optionString);
3293         describe_range_error(errcode);
3294         return JNI_EINVAL;
3295       }
3296       FLAG_SET_CMDLINE(uintx, MaxDirectMemorySize, max_direct_memory_size);
3297 #if !INCLUDE_MANAGEMENT
3298     } else if (match_option(option, "-XX:+ManagementServer")) {
3299         jio_fprintf(defaultStream::error_stream(),
3300           "ManagementServer is not supported in this VM.\n");
3301         return JNI_ERR;
3302 #endif // INCLUDE_MANAGEMENT
3303     // CreateMinidumpOnCrash is removed, and replaced by CreateCoredumpOnCrash
3304     } else if (match_option(option, "-XX:+CreateMinidumpOnCrash", &tail)) {
3305       FLAG_SET_CMDLINE(bool, CreateCoredumpOnCrash, true);
3306       jio_fprintf(defaultStream::output_stream(),
3307           "CreateMinidumpOnCrash is replaced by CreateCoredumpOnCrash: CreateCoredumpOnCrash is on\n");
3308     } else if (match_option(option, "-XX:-CreateMinidumpOnCrash", &tail)) {
3309       FLAG_SET_CMDLINE(bool, CreateCoredumpOnCrash, false);
3310       jio_fprintf(defaultStream::output_stream(),
3311           "CreateMinidumpOnCrash is replaced by CreateCoredumpOnCrash: CreateCoredumpOnCrash is off\n");
3312     } else if (match_option(option, "-XX:", &tail)) { // -XX:xxxx
3313       // Skip -XX:Flags= since that case has already been handled
3314       if (strncmp(tail, "Flags=", strlen("Flags=")) != 0) {
3315         if (!process_argument(tail, args->ignoreUnrecognized, origin)) {
3316           return JNI_EINVAL;
3317         }
3318       }
3319     // Unknown option
3320     } else if (is_bad_option(option, args->ignoreUnrecognized)) {
3321       return JNI_ERR;
3322     }
3323   }
3324 
3325   // PrintSharedArchiveAndExit will turn on
3326   //   -Xshare:on
3327   //   -XX:+TraceClassPaths
3328   if (PrintSharedArchiveAndExit) {
3329     FLAG_SET_CMDLINE(bool, UseSharedSpaces, true);
3330     FLAG_SET_CMDLINE(bool, RequireSharedSpaces, true);
3331     FLAG_SET_CMDLINE(bool, TraceClassPaths, true);