Mercurial > hg > truffle
comparison src/share/vm/runtime/arguments.cpp @ 3464:be4ca325525a
Merge.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 27 Jul 2011 17:32:44 -0700 |
parents | 1305cb3809c1 942e888897bc |
children | c919f101c1bf |
comparison
equal
deleted
inserted
replaced
3239:7c4b4daac19b | 3464:be4ca325525a |
---|---|
244 { "HandlePromotionFailure", | 244 { "HandlePromotionFailure", |
245 JDK_Version::jdk_update(6,24), JDK_Version::jdk(8) }, | 245 JDK_Version::jdk_update(6,24), JDK_Version::jdk(8) }, |
246 { "MaxLiveObjectEvacuationRatio", | 246 { "MaxLiveObjectEvacuationRatio", |
247 JDK_Version::jdk_update(6,24), JDK_Version::jdk(8) }, | 247 JDK_Version::jdk_update(6,24), JDK_Version::jdk(8) }, |
248 { "ForceSharedSpaces", JDK_Version::jdk_update(6,25), JDK_Version::jdk(8) }, | 248 { "ForceSharedSpaces", JDK_Version::jdk_update(6,25), JDK_Version::jdk(8) }, |
249 { "UseParallelOldGCCompacting", | |
250 JDK_Version::jdk_update(6,27), JDK_Version::jdk(8) }, | |
251 { "UseParallelDensePrefixUpdate", | |
252 JDK_Version::jdk_update(6,27), JDK_Version::jdk(8) }, | |
253 { "UseParallelOldGCDensePrefix", | |
254 JDK_Version::jdk_update(6,27), JDK_Version::jdk(8) }, | |
249 { "AllowTransitionalJSR292", JDK_Version::jdk(7), JDK_Version::jdk(8) }, | 255 { "AllowTransitionalJSR292", JDK_Version::jdk(7), JDK_Version::jdk(8) }, |
250 { NULL, JDK_Version(0), JDK_Version(0) } | 256 { NULL, JDK_Version(0), JDK_Version(0) } |
251 }; | 257 }; |
252 | 258 |
253 // Returns true if the flag is obsolete and fits into the range specified | 259 // Returns true if the flag is obsolete and fits into the range specified |
805 bool Arguments::process_argument(const char* arg, | 811 bool Arguments::process_argument(const char* arg, |
806 jboolean ignore_unrecognized, FlagValueOrigin origin) { | 812 jboolean ignore_unrecognized, FlagValueOrigin origin) { |
807 | 813 |
808 JDK_Version since = JDK_Version(); | 814 JDK_Version since = JDK_Version(); |
809 | 815 |
810 if (parse_argument(arg, origin)) { | 816 if (parse_argument(arg, origin) || ignore_unrecognized) { |
811 // do nothing | 817 return true; |
812 } else if (is_newly_obsolete(arg, &since)) { | 818 } |
813 enum { bufsize = 256 }; | 819 |
814 char buffer[bufsize]; | 820 const char * const argname = *arg == '+' || *arg == '-' ? arg + 1 : arg; |
815 since.to_string(buffer, bufsize); | 821 if (is_newly_obsolete(arg, &since)) { |
816 jio_fprintf(defaultStream::error_stream(), | 822 char version[256]; |
817 "Warning: The flag %s has been EOL'd as of %s and will" | 823 since.to_string(version, sizeof(version)); |
818 " be ignored\n", arg, buffer); | 824 warning("ignoring option %s; support was removed in %s", argname, version); |
819 } else { | 825 return true; |
820 if (!ignore_unrecognized) { | 826 } |
821 jio_fprintf(defaultStream::error_stream(), | 827 |
822 "Unrecognized VM option '%s'\n", arg); | 828 jio_fprintf(defaultStream::error_stream(), |
823 // allow for commandline "commenting out" options like -XX:#+Verbose | 829 "Unrecognized VM option '%s'\n", argname); |
824 if (strlen(arg) == 0 || arg[0] != '#') { | 830 // allow for commandline "commenting out" options like -XX:#+Verbose |
825 return false; | 831 return arg[0] == '#'; |
826 } | |
827 } | |
828 } | |
829 return true; | |
830 } | 832 } |
831 | 833 |
832 bool Arguments::process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized) { | 834 bool Arguments::process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized) { |
833 FILE* stream = fopen(file_name, "rb"); | 835 FILE* stream = fopen(file_name, "rb"); |
834 if (stream == NULL) { | 836 if (stream == NULL) { |
962 _mode = mode; | 964 _mode = mode; |
963 | 965 |
964 // Ensure Agent_OnLoad has the correct initial values. | 966 // Ensure Agent_OnLoad has the correct initial values. |
965 // This may not be the final mode; mode may change later in onload phase. | 967 // This may not be the final mode; mode may change later in onload phase. |
966 PropertyList_unique_add(&_system_properties, "java.vm.info", | 968 PropertyList_unique_add(&_system_properties, "java.vm.info", |
967 (char*)Abstract_VM_Version::vm_info_string(), false); | 969 (char*)VM_Version::vm_info_string(), false); |
968 | 970 |
969 UseInterpreter = true; | 971 UseInterpreter = true; |
970 UseCompiler = true; | 972 UseCompiler = true; |
971 UseLoopCounter = true; | 973 UseLoopCounter = true; |
972 | 974 |
973 #ifndef ZERO | 975 #ifndef ZERO |
974 // Turn these off for mixed and comp. Leave them on for Zero. | 976 // Turn these off for mixed and comp. Leave them on for Zero. |
975 if (FLAG_IS_DEFAULT(UseFastAccessorMethods)) { | 977 if (FLAG_IS_DEFAULT(UseFastAccessorMethods)) { |
976 UseFastAccessorMethods = mode == _int; | 978 UseFastAccessorMethods = (mode == _int); |
977 } | 979 } |
978 if (FLAG_IS_DEFAULT(UseFastEmptyMethods)) { | 980 if (FLAG_IS_DEFAULT(UseFastEmptyMethods)) { |
979 UseFastEmptyMethods = mode == _int; | 981 UseFastEmptyMethods = (mode == _int); |
980 } | 982 } |
981 #endif | 983 #endif |
982 | 984 |
983 // Default values may be platform/compiler dependent - | 985 // Default values may be platform/compiler dependent - |
984 // use the saved values | 986 // use the saved values |
1423 FLAG_SET_DEFAULT(MarkSweepDeadRatio, 1); | 1425 FLAG_SET_DEFAULT(MarkSweepDeadRatio, 1); |
1424 } | 1426 } |
1425 if (FLAG_IS_DEFAULT(PermMarkSweepDeadRatio)) { | 1427 if (FLAG_IS_DEFAULT(PermMarkSweepDeadRatio)) { |
1426 FLAG_SET_DEFAULT(PermMarkSweepDeadRatio, 5); | 1428 FLAG_SET_DEFAULT(PermMarkSweepDeadRatio, 5); |
1427 } | 1429 } |
1430 } | |
1431 } | |
1432 if (UseNUMA) { | |
1433 if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) { | |
1434 FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M); | |
1428 } | 1435 } |
1429 } | 1436 } |
1430 } | 1437 } |
1431 | 1438 |
1432 void Arguments::set_g1_gc_flags() { | 1439 void Arguments::set_g1_gc_flags() { |
1988 // Save default settings for some mode flags | 1995 // Save default settings for some mode flags |
1989 Arguments::_AlwaysCompileLoopMethods = AlwaysCompileLoopMethods; | 1996 Arguments::_AlwaysCompileLoopMethods = AlwaysCompileLoopMethods; |
1990 Arguments::_UseOnStackReplacement = UseOnStackReplacement; | 1997 Arguments::_UseOnStackReplacement = UseOnStackReplacement; |
1991 Arguments::_ClipInlining = ClipInlining; | 1998 Arguments::_ClipInlining = ClipInlining; |
1992 Arguments::_BackgroundCompilation = BackgroundCompilation; | 1999 Arguments::_BackgroundCompilation = BackgroundCompilation; |
2000 | |
2001 // Setup flags for mixed which is the default | |
2002 set_mode_flags(_mixed); | |
1993 | 2003 |
1994 // Parse JAVA_TOOL_OPTIONS environment variable (if present) | 2004 // Parse JAVA_TOOL_OPTIONS environment variable (if present) |
1995 jint result = parse_java_tool_options_environment_variable(&scp, &scp_assembly_required); | 2005 jint result = parse_java_tool_options_environment_variable(&scp, &scp_assembly_required); |
1996 if (result != JNI_OK) { | 2006 if (result != JNI_OK) { |
1997 return result; | 2007 return result; |
2378 // ostream_init_log(), when called will use this filename | 2388 // ostream_init_log(), when called will use this filename |
2379 // to initialize a fileStream. | 2389 // to initialize a fileStream. |
2380 _gc_log_filename = strdup(tail); | 2390 _gc_log_filename = strdup(tail); |
2381 FLAG_SET_CMDLINE(bool, PrintGC, true); | 2391 FLAG_SET_CMDLINE(bool, PrintGC, true); |
2382 FLAG_SET_CMDLINE(bool, PrintGCTimeStamps, true); | 2392 FLAG_SET_CMDLINE(bool, PrintGCTimeStamps, true); |
2383 FLAG_SET_CMDLINE(bool, TraceClassUnloading, true); | |
2384 | 2393 |
2385 // JNI hooks | 2394 // JNI hooks |
2386 } else if (match_option(option, "-Xcheck", &tail)) { | 2395 } else if (match_option(option, "-Xcheck", &tail)) { |
2387 if (!strcmp(tail, ":jni")) { | 2396 if (!strcmp(tail, ":jni")) { |
2388 CheckJNICalls = true; | 2397 CheckJNICalls = true; |