src/share/vm/runtime/arguments.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot-npg Sdiff src/share/vm/runtime

src/share/vm/runtime/arguments.cpp

Print this page




1049   } else {
1050     FLAG_SET_DEFAULT(UseSharedSpaces, false);
1051   }
1052 }
1053 
1054 void Arguments::set_tiered_flags() {
1055   // With tiered, set default policy to AdvancedThresholdPolicy, which is 3.
1056   if (FLAG_IS_DEFAULT(CompilationPolicyChoice)) {
1057     FLAG_SET_DEFAULT(CompilationPolicyChoice, 3);
1058   }
1059   if (CompilationPolicyChoice < 2) {
1060     vm_exit_during_initialization(
1061       "Incompatible compilation policy selected", NULL);
1062   }
1063   // Increase the code cache size - tiered compiles a lot more.
1064   if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
1065     FLAG_SET_DEFAULT(ReservedCodeCacheSize, ReservedCodeCacheSize * 2);
1066   }
1067 }
1068 
1069 #ifndef KERNEL
1070 static void disable_adaptive_size_policy(const char* collector_name) {
1071   if (UseAdaptiveSizePolicy) {
1072     if (FLAG_IS_CMDLINE(UseAdaptiveSizePolicy)) {
1073       warning("disabling UseAdaptiveSizePolicy; it is incompatible with %s.",
1074               collector_name);
1075     }
1076     FLAG_SET_DEFAULT(UseAdaptiveSizePolicy, false);
1077   }
1078 }
1079 
1080 // If the user has chosen ParallelGCThreads > 0, we set UseParNewGC
1081 // if it's not explictly set or unset. If the user has chosen
1082 // UseParNewGC and not explicitly set ParallelGCThreads we
1083 // set it, unless this is a single cpu machine.
1084 void Arguments::set_parnew_gc_flags() {
1085   assert(!UseSerialGC && !UseParallelOldGC && !UseParallelGC && !UseG1GC,
1086          "control point invariant");
1087   assert(UseParNewGC, "Error");
1088 
1089   // Turn off AdaptiveSizePolicy for parnew until it is complete.


1124       FLAG_SET_DEFAULT(ParGCUseLocalOverflow, true);
1125     }
1126     assert(ParGCUseLocalOverflow || !UseCompressedOops, "Error");
1127   }
1128 }
1129 
1130 // Adjust some sizes to suit CMS and/or ParNew needs; these work well on
1131 // sparc/solaris for certain applications, but would gain from
1132 // further optimization and tuning efforts, and would almost
1133 // certainly gain from analysis of platform and environment.
1134 void Arguments::set_cms_and_parnew_gc_flags() {
1135   assert(!UseSerialGC && !UseParallelOldGC && !UseParallelGC, "Error");
1136   assert(UseConcMarkSweepGC, "CMS is expected to be on here");
1137 
1138   // If we are using CMS, we prefer to UseParNewGC,
1139   // unless explicitly forbidden.
1140   if (FLAG_IS_DEFAULT(UseParNewGC)) {
1141     FLAG_SET_ERGO(bool, UseParNewGC, true);
1142   }
1143 
1144   // Turn off AdaptiveSizePolicy for CMS until it is complete.
1145   disable_adaptive_size_policy("UseConcMarkSweepGC");
1146 
1147   // In either case, adjust ParallelGCThreads and/or UseParNewGC
1148   // as needed.
1149   if (UseParNewGC) {
1150     set_parnew_gc_flags();
1151   }
1152 
1153   // MaxHeapSize is aligned down in collectorPolicy
1154   size_t max_heap = align_size_down(MaxHeapSize,
1155                                     CardTableRS::ct_max_alignment_constraint());
1156 
1157   // Now make adjustments for CMS
1158   intx   tenuring_default = (intx)6;
1159   size_t young_gen_per_worker = CMSYoungGenPerWorker;
1160 
1161   // Preferred young gen size for "short" pauses:
1162   // upper bound depends on # of threads and NewRatio.
1163   const uintx parallel_gc_threads =
1164     (ParallelGCThreads == 0 ? 1 : ParallelGCThreads);


1266     // OldPLAB sizing manually turned off: Use a larger default setting,
1267     // unless it was manually specified. This is because a too-low value
1268     // will slow down scavenges.
1269     if (FLAG_IS_DEFAULT(CMSParPromoteBlocksToClaim)) {
1270       FLAG_SET_ERGO(uintx, CMSParPromoteBlocksToClaim, 50); // default value before 6631166
1271     }
1272   }
1273   // Overwrite OldPLABSize which is the variable we will internally use everywhere.
1274   FLAG_SET_ERGO(uintx, OldPLABSize, CMSParPromoteBlocksToClaim);
1275   // If either of the static initialization defaults have changed, note this
1276   // modification.
1277   if (!FLAG_IS_DEFAULT(CMSParPromoteBlocksToClaim) || !FLAG_IS_DEFAULT(OldPLABWeight)) {
1278     CFLS_LAB::modify_initialization(OldPLABSize, OldPLABWeight);
1279   }
1280   if (PrintGCDetails && Verbose) {
1281     tty->print_cr("MarkStackSize: %uk  MarkStackSizeMax: %uk",
1282       MarkStackSize / K, MarkStackSizeMax / K);
1283     tty->print_cr("ConcGCThreads: %u", ConcGCThreads);
1284   }
1285 }
1286 #endif // KERNEL
1287 
1288 void set_object_alignment() {
1289   // Object alignment.
1290   assert(is_power_of_2(ObjectAlignmentInBytes), "ObjectAlignmentInBytes must be power of 2");
1291   MinObjAlignmentInBytes     = ObjectAlignmentInBytes;
1292   assert(MinObjAlignmentInBytes >= HeapWordsPerLong * HeapWordSize, "ObjectAlignmentInBytes value is too small");
1293   MinObjAlignment            = MinObjAlignmentInBytes / HeapWordSize;
1294   assert(MinObjAlignmentInBytes == MinObjAlignment * HeapWordSize, "ObjectAlignmentInBytes value is incorrect");
1295   MinObjAlignmentInBytesMask = MinObjAlignmentInBytes - 1;
1296 
1297   LogMinObjAlignmentInBytes  = exact_log2(ObjectAlignmentInBytes);
1298   LogMinObjAlignment         = LogMinObjAlignmentInBytes - LogHeapWordSize;
1299 
1300   // Oop encoding heap max
1301   OopEncodingHeapMax = (uint64_t(max_juint) + 1) << LogMinObjAlignmentInBytes;
1302 
1303 #ifndef KERNEL
1304   // Set CMS global values
1305   CompactibleFreeListSpace::set_cms_values();
1306 #endif // KERNEL
1307 }
1308 
1309 bool verify_object_alignment() {
1310   // Object alignment.
1311   if (!is_power_of_2(ObjectAlignmentInBytes)) {
1312     jio_fprintf(defaultStream::error_stream(),
1313                 "error: ObjectAlignmentInBytes=%d must be power of 2\n",
1314                 (int)ObjectAlignmentInBytes);
1315     return false;
1316   }
1317   if ((int)ObjectAlignmentInBytes < BytesPerLong) {
1318     jio_fprintf(defaultStream::error_stream(),
1319                 "error: ObjectAlignmentInBytes=%d must be greater or equal %d\n",
1320                 (int)ObjectAlignmentInBytes, BytesPerLong);
1321     return false;
1322   }
1323   // It does not make sense to have big object alignment
1324   // since a space lost due to alignment will be greater
1325   // then a saved space from compressed oops.
1326   if ((int)ObjectAlignmentInBytes > 256) {


2185     } else if (match_option(option, "-Xbootclasspath/a:", &tail)) {
2186       scp_p->add_suffix(tail);
2187       *scp_assembly_required_p = true;
2188     // -bootclasspath/p:
2189     } else if (match_option(option, "-Xbootclasspath/p:", &tail)) {
2190       scp_p->add_prefix(tail);
2191       *scp_assembly_required_p = true;
2192     // -Xrun
2193     } else if (match_option(option, "-Xrun", &tail)) {
2194       if (tail != NULL) {
2195         const char* pos = strchr(tail, ':');
2196         size_t len = (pos == NULL) ? strlen(tail) : pos - tail;
2197         char* name = (char*)memcpy(NEW_C_HEAP_ARRAY(char, len + 1, mtInternal), tail, len);
2198         name[len] = '\0';
2199 
2200         char *options = NULL;
2201         if(pos != NULL) {
2202           size_t len2 = strlen(pos+1) + 1; // options start after ':'.  Final zero must be copied.
2203           options = (char*)memcpy(NEW_C_HEAP_ARRAY(char, len2, mtInternal), pos+1, len2);
2204         }
2205 #ifdef JVMTI_KERNEL
2206         if ((strcmp(name, "hprof") == 0) || (strcmp(name, "jdwp") == 0)) {
2207           warning("profiling and debugging agents are not supported with Kernel VM");
2208         } else
2209 #endif // JVMTI_KERNEL
2210         add_init_library(name, options);
2211       }
2212     // -agentlib and -agentpath
2213     } else if (match_option(option, "-agentlib:", &tail) ||
2214           (is_absolute_path = match_option(option, "-agentpath:", &tail))) {
2215       if(tail != NULL) {
2216         const char* pos = strchr(tail, '=');
2217         size_t len = (pos == NULL) ? strlen(tail) : pos - tail;
2218         char* name = strncpy(NEW_C_HEAP_ARRAY(char, len + 1, mtInternal), tail, len);
2219         name[len] = '\0';
2220 
2221         char *options = NULL;
2222         if(pos != NULL) {
2223           options = strcpy(NEW_C_HEAP_ARRAY(char, strlen(pos + 1) + 1, mtInternal), pos + 1);
2224         }
2225 #ifdef JVMTI_KERNEL
2226         if ((strcmp(name, "hprof") == 0) || (strcmp(name, "jdwp") == 0)) {
2227           warning("profiling and debugging agents are not supported with Kernel VM");
2228         } else
2229 #endif // JVMTI_KERNEL
2230         add_init_agent(name, options, is_absolute_path);
2231 
2232       }
2233     // -javaagent
2234     } else if (match_option(option, "-javaagent:", &tail)) {



2235       if(tail != NULL) {
2236         char *options = strcpy(NEW_C_HEAP_ARRAY(char, strlen(tail) + 1, mtInternal), tail);
2237         add_init_agent("instrument", options, false);
2238       }

2239     // -Xnoclassgc
2240     } else if (match_option(option, "-Xnoclassgc", &tail)) {
2241       FLAG_SET_CMDLINE(bool, ClassUnloading, false);
2242     // -Xincgc: i-CMS
2243     } else if (match_option(option, "-Xincgc", &tail)) {
2244       FLAG_SET_CMDLINE(bool, UseConcMarkSweepGC, true);
2245       FLAG_SET_CMDLINE(bool, CMSIncrementalMode, true);
2246     // -Xnoincgc: no i-CMS
2247     } else if (match_option(option, "-Xnoincgc", &tail)) {
2248       FLAG_SET_CMDLINE(bool, UseConcMarkSweepGC, false);
2249       FLAG_SET_CMDLINE(bool, CMSIncrementalMode, false);
2250     // -Xconcgc
2251     } else if (match_option(option, "-Xconcgc", &tail)) {
2252       FLAG_SET_CMDLINE(bool, UseConcMarkSweepGC, true);
2253     // -Xnoconcgc
2254     } else if (match_option(option, "-Xnoconcgc", &tail)) {
2255       FLAG_SET_CMDLINE(bool, UseConcMarkSweepGC, false);
2256     // -Xbatch
2257     } else if (match_option(option, "-Xbatch", &tail)) {
2258       FLAG_SET_CMDLINE(bool, BackgroundCompilation, false);


2350                   "Green threads support not available\n");
2351           return JNI_EINVAL;
2352     // -native
2353     } else if (match_option(option, "-native", &tail)) {
2354           // HotSpot always uses native threads, ignore silently for compatibility
2355     // -Xsqnopause
2356     } else if (match_option(option, "-Xsqnopause", &tail)) {
2357           // EVM option, ignore silently for compatibility
2358     // -Xrs
2359     } else if (match_option(option, "-Xrs", &tail)) {
2360           // Classic/EVM option, new functionality
2361       FLAG_SET_CMDLINE(bool, ReduceSignalUsage, true);
2362     } else if (match_option(option, "-Xusealtsigs", &tail)) {
2363           // change default internal VM signals used - lower case for back compat
2364       FLAG_SET_CMDLINE(bool, UseAltSigs, true);
2365     // -Xoptimize
2366     } else if (match_option(option, "-Xoptimize", &tail)) {
2367           // EVM option, ignore silently for compatibility
2368     // -Xprof
2369     } else if (match_option(option, "-Xprof", &tail)) {
2370 #ifndef FPROF_KERNEL
2371       _has_profile = true;
2372 #else // FPROF_KERNEL
2373       // do we have to exit?
2374       warning("Kernel VM does not support flat profiling.");
2375 #endif // FPROF_KERNEL
2376     // -Xaprof
2377     } else if (match_option(option, "-Xaprof", &tail)) {
2378       _has_alloc_profile = true;
2379     // -Xconcurrentio
2380     } else if (match_option(option, "-Xconcurrentio", &tail)) {
2381       FLAG_SET_CMDLINE(bool, UseLWPSynchronization, true);
2382       FLAG_SET_CMDLINE(bool, BackgroundCompilation, false);
2383       FLAG_SET_CMDLINE(intx, DeferThrSuspendLoopCount, 1);
2384       FLAG_SET_CMDLINE(bool, UseTLAB, false);
2385       FLAG_SET_CMDLINE(uintx, NewSizeThreadIncrease, 16 * K);  // 20Kb per thread added to new generation
2386 
2387       // -Xinternalversion
2388     } else if (match_option(option, "-Xinternalversion", &tail)) {
2389       jio_fprintf(defaultStream::output_stream(), "%s\n",
2390                   VM_Version::internal_vm_info_string());
2391       vm_exit(0);
2392 #ifndef PRODUCT
2393     // -Xprintflags
2394     } else if (match_option(option, "-Xprintflags", &tail)) {
2395       CommandLineFlags::printFlags(tty, false);


2403       // Out of the box management support
2404       if (match_option(option, "-Dcom.sun.management", &tail)) {
2405         FLAG_SET_CMDLINE(bool, ManagementServer, true);
2406       }
2407     // -Xint
2408     } else if (match_option(option, "-Xint", &tail)) {
2409           set_mode_flags(_int);
2410     // -Xmixed
2411     } else if (match_option(option, "-Xmixed", &tail)) {
2412           set_mode_flags(_mixed);
2413     // -Xcomp
2414     } else if (match_option(option, "-Xcomp", &tail)) {
2415       // for testing the compiler; turn off all flags that inhibit compilation
2416           set_mode_flags(_comp);
2417 
2418     // -Xshare:dump
2419     } else if (match_option(option, "-Xshare:dump", &tail)) {
2420 #if defined(KERNEL)
2421       vm_exit_during_initialization(
2422           "Dumping a shared archive is not supported on the Kernel JVM.", NULL);



2423 #else
2424       FLAG_SET_CMDLINE(bool, DumpSharedSpaces, true);
2425       set_mode_flags(_int);     // Prevent compilation, which creates objects
2426 #endif
2427     // -Xshare:on
2428     } else if (match_option(option, "-Xshare:on", &tail)) {
2429       FLAG_SET_CMDLINE(bool, UseSharedSpaces, true);
2430       FLAG_SET_CMDLINE(bool, RequireSharedSpaces, true);
2431     // -Xshare:auto
2432     } else if (match_option(option, "-Xshare:auto", &tail)) {
2433       FLAG_SET_CMDLINE(bool, UseSharedSpaces, true);
2434       FLAG_SET_CMDLINE(bool, RequireSharedSpaces, false);
2435     // -Xshare:off
2436     } else if (match_option(option, "-Xshare:off", &tail)) {
2437       FLAG_SET_CMDLINE(bool, UseSharedSpaces, false);
2438       FLAG_SET_CMDLINE(bool, RequireSharedSpaces, false);
2439 
2440     // -Xverify
2441     } else if (match_option(option, "-Xverify", &tail)) {
2442       if (strcmp(tail, ":all") == 0 || strcmp(tail, "") == 0) {


2455     } else if (match_option(option, "-Xdebug", &tail)) {
2456       // note this flag has been used, then ignore
2457       set_xdebug_mode(true);
2458     // -Xnoagent
2459     } else if (match_option(option, "-Xnoagent", &tail)) {
2460       // For compatibility with classic. HotSpot refuses to load the old style agent.dll.
2461     } else if (match_option(option, "-Xboundthreads", &tail)) {
2462       // Bind user level threads to kernel threads (Solaris only)
2463       FLAG_SET_CMDLINE(bool, UseBoundThreads, true);
2464     } else if (match_option(option, "-Xloggc:", &tail)) {
2465       // Redirect GC output to the file. -Xloggc:<filename>
2466       // ostream_init_log(), when called will use this filename
2467       // to initialize a fileStream.
2468       _gc_log_filename = strdup(tail);
2469       FLAG_SET_CMDLINE(bool, PrintGC, true);
2470       FLAG_SET_CMDLINE(bool, PrintGCTimeStamps, true);
2471 
2472     // JNI hooks
2473     } else if (match_option(option, "-Xcheck", &tail)) {
2474       if (!strcmp(tail, ":jni")) {



2475         CheckJNICalls = true;

2476       } else if (is_bad_option(option, args->ignoreUnrecognized,
2477                                      "check")) {
2478         return JNI_EINVAL;
2479       }
2480     } else if (match_option(option, "vfprintf", &tail)) {
2481       _vfprintf_hook = CAST_TO_FN_PTR(vfprintf_hook_t, option->extraInfo);
2482     } else if (match_option(option, "exit", &tail)) {
2483       _exit_hook = CAST_TO_FN_PTR(exit_hook_t, option->extraInfo);
2484     } else if (match_option(option, "abort", &tail)) {
2485       _abort_hook = CAST_TO_FN_PTR(abort_hook_t, option->extraInfo);
2486     // -XX:+AggressiveHeap
2487     } else if (match_option(option, "-XX:+AggressiveHeap", &tail)) {
2488 
2489       // This option inspects the machine and attempts to set various
2490       // parameters to be optimal for long-running, memory allocation
2491       // intensive jobs.  It is intended for machines with large
2492       // amounts of cpu and memory.
2493 
2494       // initHeapSize is needed since _initial_heap_size is 4 bytes on a 32 bit
2495       // VM, but we may not be able to represent the total physical memory


3010       flags_file = tail;
3011       settings_file_specified = true;
3012     }
3013     if (match_option(option, "-XX:+PrintVMOptions", &tail)) {
3014       PrintVMOptions = true;
3015     }
3016     if (match_option(option, "-XX:-PrintVMOptions", &tail)) {
3017       PrintVMOptions = false;
3018     }
3019     if (match_option(option, "-XX:+IgnoreUnrecognizedVMOptions", &tail)) {
3020       IgnoreUnrecognizedVMOptions = true;
3021     }
3022     if (match_option(option, "-XX:-IgnoreUnrecognizedVMOptions", &tail)) {
3023       IgnoreUnrecognizedVMOptions = false;
3024     }
3025     if (match_option(option, "-XX:+PrintFlagsInitial", &tail)) {
3026       CommandLineFlags::printFlags(tty, false);
3027       vm_exit(0);
3028     }
3029     if (match_option(option, "-XX:NativeMemoryTracking", &tail)) {

3030       MemTracker::init_tracking_options(tail);



3031     }
3032 
3033 
3034 #ifndef PRODUCT
3035     if (match_option(option, "-XX:+PrintFlagsWithComments", &tail)) {
3036       CommandLineFlags::printFlags(tty, true);
3037       vm_exit(0);
3038     }
3039 #endif
3040   }
3041 
3042   if (IgnoreUnrecognizedVMOptions) {
3043     // uncast const to modify the flag args->ignoreUnrecognized
3044     *(jboolean*)(&args->ignoreUnrecognized) = true;
3045   }
3046 
3047   // Parse specified settings file
3048   if (settings_file_specified) {
3049     if (!process_settings_file(flags_file, true, args->ignoreUnrecognized)) {
3050       return JNI_EINVAL;


3073   }
3074 
3075   // Parse JavaVMInitArgs structure passed in, as well as JAVA_TOOL_OPTIONS and _JAVA_OPTIONS
3076   jint result = parse_vm_init_args(args);
3077   if (result != JNI_OK) {
3078     return result;
3079   }
3080 
3081   // Delay warning until here so that we've had a chance to process
3082   // the -XX:-PrintWarnings flag
3083   if (needs_hotspotrc_warning) {
3084     warning("%s file is present but has been ignored.  "
3085             "Run with -XX:Flags=%s to load the file.",
3086             hotspotrc, hotspotrc);
3087   }
3088 
3089 #if (defined JAVASE_EMBEDDED || defined ARM)
3090   UNSUPPORTED_OPTION(UseG1GC, "G1 GC");
3091 #endif
3092 















3093 #ifndef PRODUCT
3094   if (TraceBytecodesAt != 0) {
3095     TraceBytecodes = true;
3096   }
3097   if (CountCompiledCalls) {
3098     if (UseCounterDecay) {
3099       warning("UseCounterDecay disabled because CountCalls is set");
3100       UseCounterDecay = false;
3101     }
3102   }
3103 #endif // PRODUCT
3104 
3105   // JSR 292 is not supported before 1.7
3106   if (!JDK_Version::is_gte_jdk17x_version()) {
3107     if (EnableInvokeDynamic) {
3108       if (!FLAG_IS_DEFAULT(EnableInvokeDynamic)) {
3109         warning("JSR 292 is not supported before 1.7.  Disabling support.");
3110       }
3111       EnableInvokeDynamic = false;
3112     }


3121 
3122   if (PrintGCDetails) {
3123     // Turn on -verbose:gc options as well
3124     PrintGC = true;
3125   }
3126 
3127   if (!JDK_Version::is_gte_jdk18x_version()) {
3128     // To avoid changing the log format for 7 updates this flag is only
3129     // true by default in JDK8 and above.
3130     if (FLAG_IS_DEFAULT(PrintGCCause)) {
3131       FLAG_SET_DEFAULT(PrintGCCause, false);
3132     }
3133   }
3134 
3135   // Set object alignment values.
3136   set_object_alignment();
3137 
3138 #ifdef SERIALGC
3139   force_serial_gc();
3140 #endif // SERIALGC
3141 #ifdef KERNEL
3142   no_shared_spaces();
3143 #endif // KERNEL
3144 
3145   // Set flags based on ergonomics.
3146   set_ergonomics_flags();
3147 
3148   set_shared_spaces_flags();
3149 
3150   // Check the GC selections again.
3151   if (!check_gc_consistency()) {
3152     return JNI_EINVAL;
3153   }
3154 
3155   if (TieredCompilation) {
3156     set_tiered_flags();
3157   } else {
3158     // Check if the policy is valid. Policies 0 and 1 are valid for non-tiered setup.
3159     if (CompilationPolicyChoice >= 2) {
3160       vm_exit_during_initialization(
3161         "Incompatible compilation policy selected", NULL);
3162     }
3163   }
3164 
3165 #ifndef KERNEL
3166   // Set heap size based on available physical memory
3167   set_heap_size();


3168   // Set per-collector flags
3169   if (UseParallelGC || UseParallelOldGC) {
3170     set_parallel_gc_flags();
3171   } else if (UseConcMarkSweepGC) { // should be done before ParNew check below
3172     set_cms_and_parnew_gc_flags();
3173   } else if (UseParNewGC) {  // skipped if CMS is set above
3174     set_parnew_gc_flags();
3175   } else if (UseG1GC) {
3176     set_g1_gc_flags();
3177   }
3178 #endif // KERNEL
3179 
3180 #ifdef SERIALGC
3181   assert(verify_serial_gc_flags(), "SerialGC unset");
3182 #endif // SERIALGC
3183 
3184   // Set bytecode rewriting flags
3185   set_bytecode_flags();
3186 
3187   // Set flags if Aggressive optimization flags (-XX:+AggressiveOpts) enabled.
3188   set_aggressive_opts_flags();
3189 
3190   // Turn off biased locking for locking debug mode flags,
3191   // which are subtlely different from each other but neither works with
3192   // biased locking.
3193   if (UseHeavyMonitors
3194 #ifdef COMPILER1
3195       || !UseFastLocking
3196 #endif // COMPILER1
3197     ) {
3198     if (!FLAG_IS_DEFAULT(UseBiasedLocking) && UseBiasedLocking) {




1049   } else {
1050     FLAG_SET_DEFAULT(UseSharedSpaces, false);
1051   }
1052 }
1053 
1054 void Arguments::set_tiered_flags() {
1055   // With tiered, set default policy to AdvancedThresholdPolicy, which is 3.
1056   if (FLAG_IS_DEFAULT(CompilationPolicyChoice)) {
1057     FLAG_SET_DEFAULT(CompilationPolicyChoice, 3);
1058   }
1059   if (CompilationPolicyChoice < 2) {
1060     vm_exit_during_initialization(
1061       "Incompatible compilation policy selected", NULL);
1062   }
1063   // Increase the code cache size - tiered compiles a lot more.
1064   if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
1065     FLAG_SET_DEFAULT(ReservedCodeCacheSize, ReservedCodeCacheSize * 2);
1066   }
1067 }
1068 
1069 #if INCLUDE_ALTERNATE_GCS
1070 static void disable_adaptive_size_policy(const char* collector_name) {
1071   if (UseAdaptiveSizePolicy) {
1072     if (FLAG_IS_CMDLINE(UseAdaptiveSizePolicy)) {
1073       warning("disabling UseAdaptiveSizePolicy; it is incompatible with %s.",
1074               collector_name);
1075     }
1076     FLAG_SET_DEFAULT(UseAdaptiveSizePolicy, false);
1077   }
1078 }
1079 
1080 // If the user has chosen ParallelGCThreads > 0, we set UseParNewGC
1081 // if it's not explictly set or unset. If the user has chosen
1082 // UseParNewGC and not explicitly set ParallelGCThreads we
1083 // set it, unless this is a single cpu machine.
1084 void Arguments::set_parnew_gc_flags() {
1085   assert(!UseSerialGC && !UseParallelOldGC && !UseParallelGC && !UseG1GC,
1086          "control point invariant");
1087   assert(UseParNewGC, "Error");
1088 
1089   // Turn off AdaptiveSizePolicy for parnew until it is complete.


1124       FLAG_SET_DEFAULT(ParGCUseLocalOverflow, true);
1125     }
1126     assert(ParGCUseLocalOverflow || !UseCompressedOops, "Error");
1127   }
1128 }
1129 
1130 // Adjust some sizes to suit CMS and/or ParNew needs; these work well on
1131 // sparc/solaris for certain applications, but would gain from
1132 // further optimization and tuning efforts, and would almost
1133 // certainly gain from analysis of platform and environment.
1134 void Arguments::set_cms_and_parnew_gc_flags() {
1135   assert(!UseSerialGC && !UseParallelOldGC && !UseParallelGC, "Error");
1136   assert(UseConcMarkSweepGC, "CMS is expected to be on here");
1137 
1138   // If we are using CMS, we prefer to UseParNewGC,
1139   // unless explicitly forbidden.
1140   if (FLAG_IS_DEFAULT(UseParNewGC)) {
1141     FLAG_SET_ERGO(bool, UseParNewGC, true);
1142   }
1143 
1144   // Turn off AdaptiveSizePolicy by default for cms until it is complete.
1145   disable_adaptive_size_policy("UseConcMarkSweepGC");
1146 
1147   // In either case, adjust ParallelGCThreads and/or UseParNewGC
1148   // as needed.
1149   if (UseParNewGC) {
1150     set_parnew_gc_flags();
1151   }
1152 
1153   // MaxHeapSize is aligned down in collectorPolicy
1154   size_t max_heap = align_size_down(MaxHeapSize,
1155                                     CardTableRS::ct_max_alignment_constraint());
1156 
1157   // Now make adjustments for CMS
1158   intx   tenuring_default = (intx)6;
1159   size_t young_gen_per_worker = CMSYoungGenPerWorker;
1160 
1161   // Preferred young gen size for "short" pauses:
1162   // upper bound depends on # of threads and NewRatio.
1163   const uintx parallel_gc_threads =
1164     (ParallelGCThreads == 0 ? 1 : ParallelGCThreads);


1266     // OldPLAB sizing manually turned off: Use a larger default setting,
1267     // unless it was manually specified. This is because a too-low value
1268     // will slow down scavenges.
1269     if (FLAG_IS_DEFAULT(CMSParPromoteBlocksToClaim)) {
1270       FLAG_SET_ERGO(uintx, CMSParPromoteBlocksToClaim, 50); // default value before 6631166
1271     }
1272   }
1273   // Overwrite OldPLABSize which is the variable we will internally use everywhere.
1274   FLAG_SET_ERGO(uintx, OldPLABSize, CMSParPromoteBlocksToClaim);
1275   // If either of the static initialization defaults have changed, note this
1276   // modification.
1277   if (!FLAG_IS_DEFAULT(CMSParPromoteBlocksToClaim) || !FLAG_IS_DEFAULT(OldPLABWeight)) {
1278     CFLS_LAB::modify_initialization(OldPLABSize, OldPLABWeight);
1279   }
1280   if (PrintGCDetails && Verbose) {
1281     tty->print_cr("MarkStackSize: %uk  MarkStackSizeMax: %uk",
1282       MarkStackSize / K, MarkStackSizeMax / K);
1283     tty->print_cr("ConcGCThreads: %u", ConcGCThreads);
1284   }
1285 }
1286 #endif // INCLUDE_ALTERNATE_GCS
1287 
1288 void set_object_alignment() {
1289   // Object alignment.
1290   assert(is_power_of_2(ObjectAlignmentInBytes), "ObjectAlignmentInBytes must be power of 2");
1291   MinObjAlignmentInBytes     = ObjectAlignmentInBytes;
1292   assert(MinObjAlignmentInBytes >= HeapWordsPerLong * HeapWordSize, "ObjectAlignmentInBytes value is too small");
1293   MinObjAlignment            = MinObjAlignmentInBytes / HeapWordSize;
1294   assert(MinObjAlignmentInBytes == MinObjAlignment * HeapWordSize, "ObjectAlignmentInBytes value is incorrect");
1295   MinObjAlignmentInBytesMask = MinObjAlignmentInBytes - 1;
1296 
1297   LogMinObjAlignmentInBytes  = exact_log2(ObjectAlignmentInBytes);
1298   LogMinObjAlignment         = LogMinObjAlignmentInBytes - LogHeapWordSize;
1299 
1300   // Oop encoding heap max
1301   OopEncodingHeapMax = (uint64_t(max_juint) + 1) << LogMinObjAlignmentInBytes;
1302 
1303 #if INCLUDE_ALTERNATE_GCS
1304   // Set CMS global values
1305   CompactibleFreeListSpace::set_cms_values();
1306 #endif // INCLUDE_ALTERNATE_GCS
1307 }
1308 
1309 bool verify_object_alignment() {
1310   // Object alignment.
1311   if (!is_power_of_2(ObjectAlignmentInBytes)) {
1312     jio_fprintf(defaultStream::error_stream(),
1313                 "error: ObjectAlignmentInBytes=%d must be power of 2\n",
1314                 (int)ObjectAlignmentInBytes);
1315     return false;
1316   }
1317   if ((int)ObjectAlignmentInBytes < BytesPerLong) {
1318     jio_fprintf(defaultStream::error_stream(),
1319                 "error: ObjectAlignmentInBytes=%d must be greater or equal %d\n",
1320                 (int)ObjectAlignmentInBytes, BytesPerLong);
1321     return false;
1322   }
1323   // It does not make sense to have big object alignment
1324   // since a space lost due to alignment will be greater
1325   // then a saved space from compressed oops.
1326   if ((int)ObjectAlignmentInBytes > 256) {


2185     } else if (match_option(option, "-Xbootclasspath/a:", &tail)) {
2186       scp_p->add_suffix(tail);
2187       *scp_assembly_required_p = true;
2188     // -bootclasspath/p:
2189     } else if (match_option(option, "-Xbootclasspath/p:", &tail)) {
2190       scp_p->add_prefix(tail);
2191       *scp_assembly_required_p = true;
2192     // -Xrun
2193     } else if (match_option(option, "-Xrun", &tail)) {
2194       if (tail != NULL) {
2195         const char* pos = strchr(tail, ':');
2196         size_t len = (pos == NULL) ? strlen(tail) : pos - tail;
2197         char* name = (char*)memcpy(NEW_C_HEAP_ARRAY(char, len + 1, mtInternal), tail, len);
2198         name[len] = '\0';
2199 
2200         char *options = NULL;
2201         if(pos != NULL) {
2202           size_t len2 = strlen(pos+1) + 1; // options start after ':'.  Final zero must be copied.
2203           options = (char*)memcpy(NEW_C_HEAP_ARRAY(char, len2, mtInternal), pos+1, len2);
2204         }
2205 #if !INCLUDE_JVMTI
2206         if ((strcmp(name, "hprof") == 0) || (strcmp(name, "jdwp") == 0)) {
2207           warning("profiling and debugging agents are not supported in this VM");
2208         } else
2209 #endif // !INCLUDE_JVMTI
2210           add_init_library(name, options);
2211       }
2212     // -agentlib and -agentpath
2213     } else if (match_option(option, "-agentlib:", &tail) ||
2214           (is_absolute_path = match_option(option, "-agentpath:", &tail))) {
2215       if(tail != NULL) {
2216         const char* pos = strchr(tail, '=');
2217         size_t len = (pos == NULL) ? strlen(tail) : pos - tail;
2218         char* name = strncpy(NEW_C_HEAP_ARRAY(char, len + 1, mtInternal), tail, len);
2219         name[len] = '\0';
2220 
2221         char *options = NULL;
2222         if(pos != NULL) {
2223           options = strcpy(NEW_C_HEAP_ARRAY(char, strlen(pos + 1) + 1, mtInternal), pos + 1);
2224         }
2225 #if !INCLUDE_JVMTI
2226         if ((strcmp(name, "hprof") == 0) || (strcmp(name, "jdwp") == 0)) {
2227           warning("profiling and debugging agents are not supported in this VM");
2228         } else
2229 #endif // !INCLUDE_JVMTI
2230         add_init_agent(name, options, is_absolute_path);
2231 
2232       }
2233     // -javaagent
2234     } else if (match_option(option, "-javaagent:", &tail)) {
2235 #if !INCLUDE_JVMTI
2236       warning("Instrumentation agents are not supported in this VM");
2237 #else
2238       if(tail != NULL) {
2239         char *options = strcpy(NEW_C_HEAP_ARRAY(char, strlen(tail) + 1, mtInternal), tail);
2240         add_init_agent("instrument", options, false);
2241       }
2242 #endif // !INCLUDE_JVMTI
2243     // -Xnoclassgc
2244     } else if (match_option(option, "-Xnoclassgc", &tail)) {
2245       FLAG_SET_CMDLINE(bool, ClassUnloading, false);
2246     // -Xincgc: i-CMS
2247     } else if (match_option(option, "-Xincgc", &tail)) {
2248       FLAG_SET_CMDLINE(bool, UseConcMarkSweepGC, true);
2249       FLAG_SET_CMDLINE(bool, CMSIncrementalMode, true);
2250     // -Xnoincgc: no i-CMS
2251     } else if (match_option(option, "-Xnoincgc", &tail)) {
2252       FLAG_SET_CMDLINE(bool, UseConcMarkSweepGC, false);
2253       FLAG_SET_CMDLINE(bool, CMSIncrementalMode, false);
2254     // -Xconcgc
2255     } else if (match_option(option, "-Xconcgc", &tail)) {
2256       FLAG_SET_CMDLINE(bool, UseConcMarkSweepGC, true);
2257     // -Xnoconcgc
2258     } else if (match_option(option, "-Xnoconcgc", &tail)) {
2259       FLAG_SET_CMDLINE(bool, UseConcMarkSweepGC, false);
2260     // -Xbatch
2261     } else if (match_option(option, "-Xbatch", &tail)) {
2262       FLAG_SET_CMDLINE(bool, BackgroundCompilation, false);


2354                   "Green threads support not available\n");
2355           return JNI_EINVAL;
2356     // -native
2357     } else if (match_option(option, "-native", &tail)) {
2358           // HotSpot always uses native threads, ignore silently for compatibility
2359     // -Xsqnopause
2360     } else if (match_option(option, "-Xsqnopause", &tail)) {
2361           // EVM option, ignore silently for compatibility
2362     // -Xrs
2363     } else if (match_option(option, "-Xrs", &tail)) {
2364           // Classic/EVM option, new functionality
2365       FLAG_SET_CMDLINE(bool, ReduceSignalUsage, true);
2366     } else if (match_option(option, "-Xusealtsigs", &tail)) {
2367           // change default internal VM signals used - lower case for back compat
2368       FLAG_SET_CMDLINE(bool, UseAltSigs, true);
2369     // -Xoptimize
2370     } else if (match_option(option, "-Xoptimize", &tail)) {
2371           // EVM option, ignore silently for compatibility
2372     // -Xprof
2373     } else if (match_option(option, "-Xprof", &tail)) {
2374 #if INCLUDE_FPROF
2375       _has_profile = true;
2376 #else // INCLUDE_FPROF
2377       // do we have to exit?
2378       warning("Flat profiling is not supported in this VM.");
2379 #endif // INCLUDE_FPROF
2380     // -Xaprof
2381     } else if (match_option(option, "-Xaprof", &tail)) {
2382       _has_alloc_profile = true;
2383     // -Xconcurrentio
2384     } else if (match_option(option, "-Xconcurrentio", &tail)) {
2385       FLAG_SET_CMDLINE(bool, UseLWPSynchronization, true);
2386       FLAG_SET_CMDLINE(bool, BackgroundCompilation, false);
2387       FLAG_SET_CMDLINE(intx, DeferThrSuspendLoopCount, 1);
2388       FLAG_SET_CMDLINE(bool, UseTLAB, false);
2389       FLAG_SET_CMDLINE(uintx, NewSizeThreadIncrease, 16 * K);  // 20Kb per thread added to new generation
2390 
2391       // -Xinternalversion
2392     } else if (match_option(option, "-Xinternalversion", &tail)) {
2393       jio_fprintf(defaultStream::output_stream(), "%s\n",
2394                   VM_Version::internal_vm_info_string());
2395       vm_exit(0);
2396 #ifndef PRODUCT
2397     // -Xprintflags
2398     } else if (match_option(option, "-Xprintflags", &tail)) {
2399       CommandLineFlags::printFlags(tty, false);


2407       // Out of the box management support
2408       if (match_option(option, "-Dcom.sun.management", &tail)) {
2409         FLAG_SET_CMDLINE(bool, ManagementServer, true);
2410       }
2411     // -Xint
2412     } else if (match_option(option, "-Xint", &tail)) {
2413           set_mode_flags(_int);
2414     // -Xmixed
2415     } else if (match_option(option, "-Xmixed", &tail)) {
2416           set_mode_flags(_mixed);
2417     // -Xcomp
2418     } else if (match_option(option, "-Xcomp", &tail)) {
2419       // for testing the compiler; turn off all flags that inhibit compilation
2420           set_mode_flags(_comp);
2421 
2422     // -Xshare:dump
2423     } else if (match_option(option, "-Xshare:dump", &tail)) {
2424 #if defined(KERNEL)
2425       vm_exit_during_initialization(
2426           "Dumping a shared archive is not supported on the Kernel JVM.", NULL);
2427 #elif !INCLUDE_CDS
2428       vm_exit_during_initialization(
2429           "Dumping a shared archive is not supported in this VM.", NULL);
2430 #else
2431       FLAG_SET_CMDLINE(bool, DumpSharedSpaces, true);
2432       set_mode_flags(_int);     // Prevent compilation, which creates objects
2433 #endif
2434     // -Xshare:on
2435     } else if (match_option(option, "-Xshare:on", &tail)) {
2436       FLAG_SET_CMDLINE(bool, UseSharedSpaces, true);
2437       FLAG_SET_CMDLINE(bool, RequireSharedSpaces, true);
2438     // -Xshare:auto
2439     } else if (match_option(option, "-Xshare:auto", &tail)) {
2440       FLAG_SET_CMDLINE(bool, UseSharedSpaces, true);
2441       FLAG_SET_CMDLINE(bool, RequireSharedSpaces, false);
2442     // -Xshare:off
2443     } else if (match_option(option, "-Xshare:off", &tail)) {
2444       FLAG_SET_CMDLINE(bool, UseSharedSpaces, false);
2445       FLAG_SET_CMDLINE(bool, RequireSharedSpaces, false);
2446 
2447     // -Xverify
2448     } else if (match_option(option, "-Xverify", &tail)) {
2449       if (strcmp(tail, ":all") == 0 || strcmp(tail, "") == 0) {


2462     } else if (match_option(option, "-Xdebug", &tail)) {
2463       // note this flag has been used, then ignore
2464       set_xdebug_mode(true);
2465     // -Xnoagent
2466     } else if (match_option(option, "-Xnoagent", &tail)) {
2467       // For compatibility with classic. HotSpot refuses to load the old style agent.dll.
2468     } else if (match_option(option, "-Xboundthreads", &tail)) {
2469       // Bind user level threads to kernel threads (Solaris only)
2470       FLAG_SET_CMDLINE(bool, UseBoundThreads, true);
2471     } else if (match_option(option, "-Xloggc:", &tail)) {
2472       // Redirect GC output to the file. -Xloggc:<filename>
2473       // ostream_init_log(), when called will use this filename
2474       // to initialize a fileStream.
2475       _gc_log_filename = strdup(tail);
2476       FLAG_SET_CMDLINE(bool, PrintGC, true);
2477       FLAG_SET_CMDLINE(bool, PrintGCTimeStamps, true);
2478 
2479     // JNI hooks
2480     } else if (match_option(option, "-Xcheck", &tail)) {
2481       if (!strcmp(tail, ":jni")) {
2482 #if !INCLUDE_JNI_CHECK
2483         warning("JNI CHECKING is not supported in this VM");
2484 #else
2485         CheckJNICalls = true;
2486 #endif // INCLUDE_JNI_CHECK
2487       } else if (is_bad_option(option, args->ignoreUnrecognized,
2488                                      "check")) {
2489         return JNI_EINVAL;
2490       }
2491     } else if (match_option(option, "vfprintf", &tail)) {
2492       _vfprintf_hook = CAST_TO_FN_PTR(vfprintf_hook_t, option->extraInfo);
2493     } else if (match_option(option, "exit", &tail)) {
2494       _exit_hook = CAST_TO_FN_PTR(exit_hook_t, option->extraInfo);
2495     } else if (match_option(option, "abort", &tail)) {
2496       _abort_hook = CAST_TO_FN_PTR(abort_hook_t, option->extraInfo);
2497     // -XX:+AggressiveHeap
2498     } else if (match_option(option, "-XX:+AggressiveHeap", &tail)) {
2499 
2500       // This option inspects the machine and attempts to set various
2501       // parameters to be optimal for long-running, memory allocation
2502       // intensive jobs.  It is intended for machines with large
2503       // amounts of cpu and memory.
2504 
2505       // initHeapSize is needed since _initial_heap_size is 4 bytes on a 32 bit
2506       // VM, but we may not be able to represent the total physical memory


3021       flags_file = tail;
3022       settings_file_specified = true;
3023     }
3024     if (match_option(option, "-XX:+PrintVMOptions", &tail)) {
3025       PrintVMOptions = true;
3026     }
3027     if (match_option(option, "-XX:-PrintVMOptions", &tail)) {
3028       PrintVMOptions = false;
3029     }
3030     if (match_option(option, "-XX:+IgnoreUnrecognizedVMOptions", &tail)) {
3031       IgnoreUnrecognizedVMOptions = true;
3032     }
3033     if (match_option(option, "-XX:-IgnoreUnrecognizedVMOptions", &tail)) {
3034       IgnoreUnrecognizedVMOptions = false;
3035     }
3036     if (match_option(option, "-XX:+PrintFlagsInitial", &tail)) {
3037       CommandLineFlags::printFlags(tty, false);
3038       vm_exit(0);
3039     }
3040     if (match_option(option, "-XX:NativeMemoryTracking", &tail)) {
3041 #if INCLUDE_NMT
3042       MemTracker::init_tracking_options(tail);
3043 #else
3044       warning("Native Memory Tracking is not supported in this VM");
3045 #endif
3046     }
3047 
3048 
3049 #ifndef PRODUCT
3050     if (match_option(option, "-XX:+PrintFlagsWithComments", &tail)) {
3051       CommandLineFlags::printFlags(tty, true);
3052       vm_exit(0);
3053     }
3054 #endif
3055   }
3056 
3057   if (IgnoreUnrecognizedVMOptions) {
3058     // uncast const to modify the flag args->ignoreUnrecognized
3059     *(jboolean*)(&args->ignoreUnrecognized) = true;
3060   }
3061 
3062   // Parse specified settings file
3063   if (settings_file_specified) {
3064     if (!process_settings_file(flags_file, true, args->ignoreUnrecognized)) {
3065       return JNI_EINVAL;


3088   }
3089 
3090   // Parse JavaVMInitArgs structure passed in, as well as JAVA_TOOL_OPTIONS and _JAVA_OPTIONS
3091   jint result = parse_vm_init_args(args);
3092   if (result != JNI_OK) {
3093     return result;
3094   }
3095 
3096   // Delay warning until here so that we've had a chance to process
3097   // the -XX:-PrintWarnings flag
3098   if (needs_hotspotrc_warning) {
3099     warning("%s file is present but has been ignored.  "
3100             "Run with -XX:Flags=%s to load the file.",
3101             hotspotrc, hotspotrc);
3102   }
3103 
3104 #if (defined JAVASE_EMBEDDED || defined ARM)
3105   UNSUPPORTED_OPTION(UseG1GC, "G1 GC");
3106 #endif
3107 
3108 #if !INCLUDE_ALTERNATE_GCS
3109   if (UseParallelGC) {
3110     warning("Parallel GC is not supported in this VM.  Using Serial GC.");
3111   }
3112   if (UseParallelOldGC) {
3113     warning("Parallel Old GC is not supported in this VM.  Using Serial GC.");
3114   }
3115   if (UseConcMarkSweepGC) {
3116     warning("Concurrent Mark Sweep GC is not supported in this VM.  Using Serial GC.");
3117   }
3118   if (UseParNewGC) {
3119     warning("Par Neew GC is not supported in this VM.  Using Serial GC.");
3120   }
3121 #endif // INCLUDE_ALTERNATE_GCS
3122 
3123 #ifndef PRODUCT
3124   if (TraceBytecodesAt != 0) {
3125     TraceBytecodes = true;
3126   }
3127   if (CountCompiledCalls) {
3128     if (UseCounterDecay) {
3129       warning("UseCounterDecay disabled because CountCalls is set");
3130       UseCounterDecay = false;
3131     }
3132   }
3133 #endif // PRODUCT
3134 
3135   // JSR 292 is not supported before 1.7
3136   if (!JDK_Version::is_gte_jdk17x_version()) {
3137     if (EnableInvokeDynamic) {
3138       if (!FLAG_IS_DEFAULT(EnableInvokeDynamic)) {
3139         warning("JSR 292 is not supported before 1.7.  Disabling support.");
3140       }
3141       EnableInvokeDynamic = false;
3142     }


3151 
3152   if (PrintGCDetails) {
3153     // Turn on -verbose:gc options as well
3154     PrintGC = true;
3155   }
3156 
3157   if (!JDK_Version::is_gte_jdk18x_version()) {
3158     // To avoid changing the log format for 7 updates this flag is only
3159     // true by default in JDK8 and above.
3160     if (FLAG_IS_DEFAULT(PrintGCCause)) {
3161       FLAG_SET_DEFAULT(PrintGCCause, false);
3162     }
3163   }
3164 
3165   // Set object alignment values.
3166   set_object_alignment();
3167 
3168 #ifdef SERIALGC
3169   force_serial_gc();
3170 #endif // SERIALGC
3171 #if !INCLUDE_CDS
3172   no_shared_spaces();
3173 #endif // INCLUDE_CDS
3174 
3175   // Set flags based on ergonomics.
3176   set_ergonomics_flags();
3177 
3178   set_shared_spaces_flags();
3179 
3180   // Check the GC selections again.
3181   if (!check_gc_consistency()) {
3182     return JNI_EINVAL;
3183   }
3184 
3185   if (TieredCompilation) {
3186     set_tiered_flags();
3187   } else {
3188     // Check if the policy is valid. Policies 0 and 1 are valid for non-tiered setup.
3189     if (CompilationPolicyChoice >= 2) {
3190       vm_exit_during_initialization(
3191         "Incompatible compilation policy selected", NULL);
3192     }
3193   }
3194 

3195   // Set heap size based on available physical memory
3196   set_heap_size();
3197 
3198 #if INCLUDE_ALTERNATE_GCS
3199   // Set per-collector flags
3200   if (UseParallelGC || UseParallelOldGC) {
3201     set_parallel_gc_flags();
3202   } else if (UseConcMarkSweepGC) { // should be done before ParNew check below
3203     set_cms_and_parnew_gc_flags();
3204   } else if (UseParNewGC) {  // skipped if CMS is set above
3205     set_parnew_gc_flags();
3206   } else if (UseG1GC) {
3207     set_g1_gc_flags();
3208   }
3209 #endif // INCLUDE_ALTERNATE_GCS
3210 
3211 #ifdef SERIALGC
3212   assert(verify_serial_gc_flags(), "SerialGC unset");
3213 #endif // SERIALGC
3214 
3215   // Set bytecode rewriting flags
3216   set_bytecode_flags();
3217 
3218   // Set flags if Aggressive optimization flags (-XX:+AggressiveOpts) enabled.
3219   set_aggressive_opts_flags();
3220 
3221   // Turn off biased locking for locking debug mode flags,
3222   // which are subtlely different from each other but neither works with
3223   // biased locking.
3224   if (UseHeavyMonitors
3225 #ifdef COMPILER1
3226       || !UseFastLocking
3227 #endif // COMPILER1
3228     ) {
3229     if (!FLAG_IS_DEFAULT(UseBiasedLocking) && UseBiasedLocking) {


src/share/vm/runtime/arguments.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File