161 if (match_option(option, "-Dsun.java.launcher=", &tail)) {
162 process_java_launcher_argument(tail, option->extraInfo);
163 continue;
164 }
165 if (match_option(option, "-Dsun.java.launcher.pid=", &tail)) {
166 _sun_java_launcher_pid = atoi(tail);
167 continue;
168 }
169 }
170 }
171
172 // Initialize system properties key and value.
173 void Arguments::init_system_properties() {
174
175 PropertyList_add(&_system_properties, new SystemProperty("java.vm.specification.name",
176 "Java Virtual Machine Specification", false));
177 PropertyList_add(&_system_properties, new SystemProperty("java.vm.version", VM_Version::vm_release(), false));
178 PropertyList_add(&_system_properties, new SystemProperty("java.vm.name", VM_Version::vm_name(), false));
179 PropertyList_add(&_system_properties, new SystemProperty("java.vm.info", VM_Version::vm_info_string(), true));
180
181 // following are JVMTI agent writeable properties.
182 // Properties values are set to NULL and they are
183 // os specific they are initialized in os::init_system_properties_values().
184 _java_ext_dirs = new SystemProperty("java.ext.dirs", NULL, true);
185 _java_endorsed_dirs = new SystemProperty("java.endorsed.dirs", NULL, true);
186 _sun_boot_library_path = new SystemProperty("sun.boot.library.path", NULL, true);
187 _java_library_path = new SystemProperty("java.library.path", NULL, true);
188 _java_home = new SystemProperty("java.home", NULL, true);
189 _sun_boot_class_path = new SystemProperty("sun.boot.class.path", NULL, true);
190
191 _java_class_path = new SystemProperty("java.class.path", "", true);
192
193 // Add to System Property list.
194 PropertyList_add(&_system_properties, _java_ext_dirs);
195 PropertyList_add(&_system_properties, _java_endorsed_dirs);
196 PropertyList_add(&_system_properties, _sun_boot_library_path);
197 PropertyList_add(&_system_properties, _java_library_path);
198 PropertyList_add(&_system_properties, _java_home);
199 PropertyList_add(&_system_properties, _java_class_path);
200 PropertyList_add(&_system_properties, _sun_boot_class_path);
201
1289 // promote all objects surviving "tenuring_default" scavenges.
1290 if (FLAG_IS_DEFAULT(MaxTenuringThreshold) &&
1291 FLAG_IS_DEFAULT(SurvivorRatio)) {
1292 FLAG_SET_ERGO(uintx, MaxTenuringThreshold, tenuring_default);
1293 }
1294 // If we decided above (or user explicitly requested)
1295 // `promote all' (via MaxTenuringThreshold := 0),
1296 // prefer minuscule survivor spaces so as not to waste
1297 // space for (non-existent) survivors
1298 if (FLAG_IS_DEFAULT(SurvivorRatio) && MaxTenuringThreshold == 0) {
1299 FLAG_SET_ERGO(uintx, SurvivorRatio, MAX2((uintx)1024, SurvivorRatio));
1300 }
1301 // If OldPLABSize is set and CMSParPromoteBlocksToClaim is not,
1302 // set CMSParPromoteBlocksToClaim equal to OldPLABSize.
1303 // This is done in order to make ParNew+CMS configuration to work
1304 // with YoungPLABSize and OldPLABSize options.
1305 // See CR 6362902.
1306 if (!FLAG_IS_DEFAULT(OldPLABSize)) {
1307 if (FLAG_IS_DEFAULT(CMSParPromoteBlocksToClaim)) {
1308 // OldPLABSize is not the default value but CMSParPromoteBlocksToClaim
1309 // is. In this situtation let CMSParPromoteBlocksToClaim follow
1310 // the value (either from the command line or ergonomics) of
1311 // OldPLABSize. Following OldPLABSize is an ergonomics decision.
1312 FLAG_SET_ERGO(uintx, CMSParPromoteBlocksToClaim, OldPLABSize);
1313 } else {
1314 // OldPLABSize and CMSParPromoteBlocksToClaim are both set.
1315 // CMSParPromoteBlocksToClaim is a collector-specific flag, so
1316 // we'll let it to take precedence.
1317 jio_fprintf(defaultStream::error_stream(),
1318 "Both OldPLABSize and CMSParPromoteBlocksToClaim"
1319 " options are specified for the CMS collector."
1320 " CMSParPromoteBlocksToClaim will take precedence.\n");
1321 }
1322 }
1323 if (!FLAG_IS_DEFAULT(ResizeOldPLAB) && !ResizeOldPLAB) {
1324 // OldPLAB sizing manually turned off: Use a larger default setting,
1325 // unless it was manually specified. This is because a too-low value
1326 // will slow down scavenges.
1327 if (FLAG_IS_DEFAULT(CMSParPromoteBlocksToClaim)) {
1328 FLAG_SET_ERGO(uintx, CMSParPromoteBlocksToClaim, 50); // default value before 6631166
1329 }
3649 } else if (UseConcMarkSweepGC) { // should be done before ParNew check below
3650 set_cms_and_parnew_gc_flags();
3651 } else if (UseParNewGC) { // skipped if CMS is set above
3652 set_parnew_gc_flags();
3653 } else if (UseG1GC) {
3654 set_g1_gc_flags();
3655 }
3656 check_deprecated_gcs();
3657 check_deprecated_gc_flags();
3658 if (AssumeMP && !UseSerialGC) {
3659 if (FLAG_IS_DEFAULT(ParallelGCThreads) && ParallelGCThreads == 1) {
3660 warning("If the number of processors is expected to increase from one, then"
3661 " you should configure the number of parallel GC threads appropriately"
3662 " using -XX:ParallelGCThreads=N");
3663 }
3664 }
3665 #else // INCLUDE_ALL_GCS
3666 assert(verify_serial_gc_flags(), "SerialGC unset");
3667 #endif // INCLUDE_ALL_GCS
3668
3669 // Initialize Metaspace flags and alignments.
3670 Metaspace::ergo_initialize();
3671
3672 // Set bytecode rewriting flags
3673 set_bytecode_flags();
3674
3675 // Set flags if Aggressive optimization flags (-XX:+AggressiveOpts) enabled.
3676 set_aggressive_opts_flags();
3677
3678 // Turn off biased locking for locking debug mode flags,
3679 // which are subtlely different from each other but neither works with
3680 // biased locking.
3681 if (UseHeavyMonitors
3682 #ifdef COMPILER1
3683 || !UseFastLocking
3684 #endif // COMPILER1
3685 ) {
3686 if (!FLAG_IS_DEFAULT(UseBiasedLocking) && UseBiasedLocking) {
3687 // flag set to true on command line; warn the user that they
3688 // can't enable biased locking here
3689 warning("Biased Locking is not supported with locking debug flags"
3690 "; ignoring UseBiasedLocking flag." );
3691 }
3692 UseBiasedLocking = false;
3693 }
3694
3695 #ifdef CC_INTERP
3696 // Clear flags not supported by the C++ interpreter
3697 FLAG_SET_DEFAULT(ProfileInterpreter, false);
3698 FLAG_SET_DEFAULT(UseBiasedLocking, false);
3699 LP64_ONLY(FLAG_SET_DEFAULT(UseCompressedOops, false));
3700 LP64_ONLY(FLAG_SET_DEFAULT(UseCompressedClassPointers, false));
|
161 if (match_option(option, "-Dsun.java.launcher=", &tail)) {
162 process_java_launcher_argument(tail, option->extraInfo);
163 continue;
164 }
165 if (match_option(option, "-Dsun.java.launcher.pid=", &tail)) {
166 _sun_java_launcher_pid = atoi(tail);
167 continue;
168 }
169 }
170 }
171
172 // Initialize system properties key and value.
173 void Arguments::init_system_properties() {
174
175 PropertyList_add(&_system_properties, new SystemProperty("java.vm.specification.name",
176 "Java Virtual Machine Specification", false));
177 PropertyList_add(&_system_properties, new SystemProperty("java.vm.version", VM_Version::vm_release(), false));
178 PropertyList_add(&_system_properties, new SystemProperty("java.vm.name", VM_Version::vm_name(), false));
179 PropertyList_add(&_system_properties, new SystemProperty("java.vm.info", VM_Version::vm_info_string(), true));
180
181 // Following are JVMTI agent writable properties.
182 // Properties values are set to NULL and they are
183 // os specific they are initialized in os::init_system_properties_values().
184 _java_ext_dirs = new SystemProperty("java.ext.dirs", NULL, true);
185 _java_endorsed_dirs = new SystemProperty("java.endorsed.dirs", NULL, true);
186 _sun_boot_library_path = new SystemProperty("sun.boot.library.path", NULL, true);
187 _java_library_path = new SystemProperty("java.library.path", NULL, true);
188 _java_home = new SystemProperty("java.home", NULL, true);
189 _sun_boot_class_path = new SystemProperty("sun.boot.class.path", NULL, true);
190
191 _java_class_path = new SystemProperty("java.class.path", "", true);
192
193 // Add to System Property list.
194 PropertyList_add(&_system_properties, _java_ext_dirs);
195 PropertyList_add(&_system_properties, _java_endorsed_dirs);
196 PropertyList_add(&_system_properties, _sun_boot_library_path);
197 PropertyList_add(&_system_properties, _java_library_path);
198 PropertyList_add(&_system_properties, _java_home);
199 PropertyList_add(&_system_properties, _java_class_path);
200 PropertyList_add(&_system_properties, _sun_boot_class_path);
201
1289 // promote all objects surviving "tenuring_default" scavenges.
1290 if (FLAG_IS_DEFAULT(MaxTenuringThreshold) &&
1291 FLAG_IS_DEFAULT(SurvivorRatio)) {
1292 FLAG_SET_ERGO(uintx, MaxTenuringThreshold, tenuring_default);
1293 }
1294 // If we decided above (or user explicitly requested)
1295 // `promote all' (via MaxTenuringThreshold := 0),
1296 // prefer minuscule survivor spaces so as not to waste
1297 // space for (non-existent) survivors
1298 if (FLAG_IS_DEFAULT(SurvivorRatio) && MaxTenuringThreshold == 0) {
1299 FLAG_SET_ERGO(uintx, SurvivorRatio, MAX2((uintx)1024, SurvivorRatio));
1300 }
1301 // If OldPLABSize is set and CMSParPromoteBlocksToClaim is not,
1302 // set CMSParPromoteBlocksToClaim equal to OldPLABSize.
1303 // This is done in order to make ParNew+CMS configuration to work
1304 // with YoungPLABSize and OldPLABSize options.
1305 // See CR 6362902.
1306 if (!FLAG_IS_DEFAULT(OldPLABSize)) {
1307 if (FLAG_IS_DEFAULT(CMSParPromoteBlocksToClaim)) {
1308 // OldPLABSize is not the default value but CMSParPromoteBlocksToClaim
1309 // is. In this situation let CMSParPromoteBlocksToClaim follow
1310 // the value (either from the command line or ergonomics) of
1311 // OldPLABSize. Following OldPLABSize is an ergonomics decision.
1312 FLAG_SET_ERGO(uintx, CMSParPromoteBlocksToClaim, OldPLABSize);
1313 } else {
1314 // OldPLABSize and CMSParPromoteBlocksToClaim are both set.
1315 // CMSParPromoteBlocksToClaim is a collector-specific flag, so
1316 // we'll let it to take precedence.
1317 jio_fprintf(defaultStream::error_stream(),
1318 "Both OldPLABSize and CMSParPromoteBlocksToClaim"
1319 " options are specified for the CMS collector."
1320 " CMSParPromoteBlocksToClaim will take precedence.\n");
1321 }
1322 }
1323 if (!FLAG_IS_DEFAULT(ResizeOldPLAB) && !ResizeOldPLAB) {
1324 // OldPLAB sizing manually turned off: Use a larger default setting,
1325 // unless it was manually specified. This is because a too-low value
1326 // will slow down scavenges.
1327 if (FLAG_IS_DEFAULT(CMSParPromoteBlocksToClaim)) {
1328 FLAG_SET_ERGO(uintx, CMSParPromoteBlocksToClaim, 50); // default value before 6631166
1329 }
3649 } else if (UseConcMarkSweepGC) { // should be done before ParNew check below
3650 set_cms_and_parnew_gc_flags();
3651 } else if (UseParNewGC) { // skipped if CMS is set above
3652 set_parnew_gc_flags();
3653 } else if (UseG1GC) {
3654 set_g1_gc_flags();
3655 }
3656 check_deprecated_gcs();
3657 check_deprecated_gc_flags();
3658 if (AssumeMP && !UseSerialGC) {
3659 if (FLAG_IS_DEFAULT(ParallelGCThreads) && ParallelGCThreads == 1) {
3660 warning("If the number of processors is expected to increase from one, then"
3661 " you should configure the number of parallel GC threads appropriately"
3662 " using -XX:ParallelGCThreads=N");
3663 }
3664 }
3665 #else // INCLUDE_ALL_GCS
3666 assert(verify_serial_gc_flags(), "SerialGC unset");
3667 #endif // INCLUDE_ALL_GCS
3668
3669 // Initialize Metaspace flags and alignments
3670 Metaspace::ergo_initialize();
3671
3672 // Set bytecode rewriting flags
3673 set_bytecode_flags();
3674
3675 // Set flags if Aggressive optimization flags (-XX:+AggressiveOpts) enabled
3676 set_aggressive_opts_flags();
3677
3678 // Turn off biased locking for locking debug mode flags,
3679 // which are subtly different from each other but neither works with
3680 // biased locking
3681 if (UseHeavyMonitors
3682 #ifdef COMPILER1
3683 || !UseFastLocking
3684 #endif // COMPILER1
3685 ) {
3686 if (!FLAG_IS_DEFAULT(UseBiasedLocking) && UseBiasedLocking) {
3687 // flag set to true on command line; warn the user that they
3688 // can't enable biased locking here
3689 warning("Biased Locking is not supported with locking debug flags"
3690 "; ignoring UseBiasedLocking flag." );
3691 }
3692 UseBiasedLocking = false;
3693 }
3694
3695 #ifdef CC_INTERP
3696 // Clear flags not supported by the C++ interpreter
3697 FLAG_SET_DEFAULT(ProfileInterpreter, false);
3698 FLAG_SET_DEFAULT(UseBiasedLocking, false);
3699 LP64_ONLY(FLAG_SET_DEFAULT(UseCompressedOops, false));
3700 LP64_ONLY(FLAG_SET_DEFAULT(UseCompressedClassPointers, false));
|