Mercurial > hg > truffle
diff src/share/vm/runtime/arguments.cpp @ 1162:d749b1813f40
Merge
author | trims |
---|---|
date | Fri, 15 Jan 2010 14:25:44 -0800 |
parents | 1fc01a2425ce |
children | 99af867dfa05 |
line wrap: on
line diff
--- a/src/share/vm/runtime/arguments.cpp Thu Jan 14 15:48:26 2010 -0800 +++ b/src/share/vm/runtime/arguments.cpp Fri Jan 15 14:25:44 2010 -0800 @@ -948,6 +948,7 @@ } } +#ifndef KERNEL // If the user has chosen ParallelGCThreads > 0, we set UseParNewGC // if it's not explictly set or unset. If the user has chosen // UseParNewGC and not explicitly set ParallelGCThreads we @@ -1177,8 +1178,7 @@ // the value (either from the command line or ergonomics) of // OldPLABSize. Following OldPLABSize is an ergonomics decision. FLAG_SET_ERGO(uintx, CMSParPromoteBlocksToClaim, OldPLABSize); - } - else { + } else { // OldPLABSize and CMSParPromoteBlocksToClaim are both set. // CMSParPromoteBlocksToClaim is a collector-specific flag, so // we'll let it to take precedence. @@ -1188,7 +1188,23 @@ " CMSParPromoteBlocksToClaim will take precedence.\n"); } } + if (!FLAG_IS_DEFAULT(ResizeOldPLAB) && !ResizeOldPLAB) { + // OldPLAB sizing manually turned off: Use a larger default setting, + // unless it was manually specified. This is because a too-low value + // will slow down scavenges. + if (FLAG_IS_DEFAULT(CMSParPromoteBlocksToClaim)) { + FLAG_SET_ERGO(uintx, CMSParPromoteBlocksToClaim, 50); // default value before 6631166 + } + } + // Overwrite OldPLABSize which is the variable we will internally use everywhere. + FLAG_SET_ERGO(uintx, OldPLABSize, CMSParPromoteBlocksToClaim); + // If either of the static initialization defaults have changed, note this + // modification. + if (!FLAG_IS_DEFAULT(CMSParPromoteBlocksToClaim) || !FLAG_IS_DEFAULT(OldPLABWeight)) { + CFLS_LAB::modify_initialization(OldPLABSize, OldPLABWeight); + } } +#endif // KERNEL inline uintx max_heap_for_compressed_oops() { LP64_ONLY(return oopDesc::OopEncodingHeapMax - MaxPermSize - os::vm_page_size()); @@ -1850,7 +1866,6 @@ FLAG_SET_CMDLINE(bool, TraceClassUnloading, true); } else if (!strcmp(tail, ":gc")) { FLAG_SET_CMDLINE(bool, PrintGC, true); - FLAG_SET_CMDLINE(bool, TraceClassUnloading, true); } else if (!strcmp(tail, ":jni")) { FLAG_SET_CMDLINE(bool, PrintJNIResolving, true); } @@ -2370,22 +2385,25 @@ "ExtendedDTraceProbes flag is only applicable on Solaris\n"); return JNI_EINVAL; #endif // ndef SOLARIS - } else #ifdef ASSERT - if (match_option(option, "-XX:+FullGCALot", &tail)) { + } else if (match_option(option, "-XX:+FullGCALot", &tail)) { FLAG_SET_CMDLINE(bool, FullGCALot, true); // disable scavenge before parallel mark-compact FLAG_SET_CMDLINE(bool, ScavengeBeforeFullGC, false); - } else #endif - if (match_option(option, "-XX:ParCMSPromoteBlocksToClaim=", &tail)) { + } else if (match_option(option, "-XX:CMSParPromoteBlocksToClaim=", &tail)) { julong cms_blocks_to_claim = (julong)atol(tail); FLAG_SET_CMDLINE(uintx, CMSParPromoteBlocksToClaim, cms_blocks_to_claim); jio_fprintf(defaultStream::error_stream(), - "Please use -XX:CMSParPromoteBlocksToClaim in place of " + "Please use -XX:OldPLABSize in place of " + "-XX:CMSParPromoteBlocksToClaim in the future\n"); + } else if (match_option(option, "-XX:ParCMSPromoteBlocksToClaim=", &tail)) { + julong cms_blocks_to_claim = (julong)atol(tail); + FLAG_SET_CMDLINE(uintx, CMSParPromoteBlocksToClaim, cms_blocks_to_claim); + jio_fprintf(defaultStream::error_stream(), + "Please use -XX:OldPLABSize in place of " "-XX:ParCMSPromoteBlocksToClaim in the future\n"); - } else - if (match_option(option, "-XX:ParallelGCOldGenAllocBufferSize=", &tail)) { + } else if (match_option(option, "-XX:ParallelGCOldGenAllocBufferSize=", &tail)) { julong old_plab_size = 0; ArgsRange errcode = parse_memory_size(tail, &old_plab_size, 1); if (errcode != arg_in_range) { @@ -2398,8 +2416,7 @@ jio_fprintf(defaultStream::error_stream(), "Please use -XX:OldPLABSize in place of " "-XX:ParallelGCOldGenAllocBufferSize in the future\n"); - } else - if (match_option(option, "-XX:ParallelGCToSpaceAllocBufferSize=", &tail)) { + } else if (match_option(option, "-XX:ParallelGCToSpaceAllocBufferSize=", &tail)) { julong young_plab_size = 0; ArgsRange errcode = parse_memory_size(tail, &young_plab_size, 1); if (errcode != arg_in_range) { @@ -2412,8 +2429,7 @@ jio_fprintf(defaultStream::error_stream(), "Please use -XX:YoungPLABSize in place of " "-XX:ParallelGCToSpaceAllocBufferSize in the future\n"); - } else - if (match_option(option, "-XX:", &tail)) { // -XX:xxxx + } else if (match_option(option, "-XX:", &tail)) { // -XX:xxxx // Skip -XX:Flags= since that case has already been handled if (strncmp(tail, "Flags=", strlen("Flags=")) != 0) { if (!process_argument(tail, args->ignoreUnrecognized, origin)) { @@ -2633,6 +2649,10 @@ if (match_option(option, "-XX:-IgnoreUnrecognizedVMOptions", &tail)) { IgnoreUnrecognizedVMOptions = false; } + if (match_option(option, "-XX:+PrintFlagsInitial", &tail)) { + CommandLineFlags::printFlags(); + vm_exit(0); + } } if (IgnoreUnrecognizedVMOptions) { @@ -2699,13 +2719,19 @@ } ScavengeRootsInCode = 1; } +#ifdef COMPILER2 + if (EnableInvokeDynamic && DoEscapeAnalysis) { + // TODO: We need to find rules for invokedynamic and EA. For now, + // simply disable EA by default. + if (FLAG_IS_DEFAULT(DoEscapeAnalysis)) { + DoEscapeAnalysis = false; + } + } +#endif if (PrintGCDetails) { // Turn on -verbose:gc options as well PrintGC = true; - if (FLAG_IS_DEFAULT(TraceClassUnloading)) { - TraceClassUnloading = true; - } } #if defined(_LP64) && defined(COMPILER1) @@ -2722,11 +2748,21 @@ // Set flags based on ergonomics. set_ergonomics_flags(); +#ifdef _LP64 + // XXX JSR 292 currently does not support compressed oops. + if (EnableMethodHandles && UseCompressedOops) { + if (FLAG_IS_DEFAULT(UseCompressedOops) || FLAG_IS_ERGO(UseCompressedOops)) { + UseCompressedOops = false; + } + } +#endif // _LP64 + // Check the GC selections again. if (!check_gc_consistency()) { return JNI_EINVAL; } +#ifndef KERNEL if (UseConcMarkSweepGC) { // Set flags for CMS and ParNew. Check UseConcMarkSweep first // to ensure that when both UseConcMarkSweepGC and UseParNewGC @@ -2744,6 +2780,7 @@ set_g1_gc_flags(); } } +#endif // KERNEL #ifdef SERIALGC assert(verify_serial_gc_flags(), "SerialGC unset"); @@ -2756,9 +2793,16 @@ set_aggressive_opts_flags(); #ifdef CC_INTERP - // Biased locking is not implemented with c++ interpreter + // Clear flags not supported by the C++ interpreter + FLAG_SET_DEFAULT(ProfileInterpreter, false); FLAG_SET_DEFAULT(UseBiasedLocking, false); -#endif /* CC_INTERP */ + LP64_ONLY(FLAG_SET_DEFAULT(UseCompressedOops, false)); +#endif // CC_INTERP + +#ifdef ZERO + // Clear flags not supported by Zero + FLAG_SET_DEFAULT(TaggedStackInterpreter, false); +#endif // ZERO #ifdef COMPILER2 if (!UseBiasedLocking || EmitSync != 0) { @@ -2766,15 +2810,18 @@ } #endif + if (PrintAssembly && FLAG_IS_DEFAULT(DebugNonSafepoints)) { + warning("PrintAssembly is enabled; turning on DebugNonSafepoints to gain additional output"); + DebugNonSafepoints = true; + } + if (PrintCommandLineFlags) { CommandLineFlags::printSetFlags(); } -#ifdef ASSERT if (PrintFlagsFinal) { CommandLineFlags::printFlags(); } -#endif return JNI_OK; }