Mercurial > hg > truffle
diff src/share/vm/runtime/arguments.cpp @ 570:dca06e7f503d
Merge
author | kvn |
---|---|
date | Tue, 17 Feb 2009 14:30:24 -0800 |
parents | 40ee984935b9 323728917cf4 |
children | 0fbdb4381b99 660978a2a31a |
line wrap: on
line diff
--- a/src/share/vm/runtime/arguments.cpp Tue Feb 10 18:39:09 2009 +0300 +++ b/src/share/vm/runtime/arguments.cpp Tue Feb 17 14:30:24 2009 -0800 @@ -2489,7 +2489,7 @@ vm_args.version = JNI_VERSION_1_2; vm_args.options = options; vm_args.nOptions = i; - vm_args.ignoreUnrecognized = false; + vm_args.ignoreUnrecognized = IgnoreUnrecognizedVMOptions; if (PrintVMOptions) { const char* tail; @@ -2536,13 +2536,12 @@ // If flag "-XX:Flags=flags-file" is used it will be the first option to be processed. bool settings_file_specified = false; + const char* flags_file; int index; for (index = 0; index < args->nOptions; index++) { const JavaVMOption *option = args->options + index; if (match_option(option, "-XX:Flags=", &tail)) { - if (!process_settings_file(tail, true, args->ignoreUnrecognized)) { - return JNI_EINVAL; - } + flags_file = tail; settings_file_specified = true; } if (match_option(option, "-XX:+PrintVMOptions", &tail)) { @@ -2551,6 +2550,24 @@ if (match_option(option, "-XX:-PrintVMOptions", &tail)) { PrintVMOptions = false; } + if (match_option(option, "-XX:+IgnoreUnrecognizedVMOptions", &tail)) { + IgnoreUnrecognizedVMOptions = true; + } + if (match_option(option, "-XX:-IgnoreUnrecognizedVMOptions", &tail)) { + IgnoreUnrecognizedVMOptions = false; + } + } + + if (IgnoreUnrecognizedVMOptions) { + // uncast const to modify the flag args->ignoreUnrecognized + *(jboolean*)(&args->ignoreUnrecognized) = true; + } + + // Parse specified settings file + if (settings_file_specified) { + if (!process_settings_file(flags_file, true, args->ignoreUnrecognized)) { + return JNI_EINVAL; + } } // Parse default .hotspotrc settings file