1066 vm_exit_during_initialization( 1067 "Incompatible compilation policy selected", NULL); 1068 } 1069 // Increase the code cache size - tiered compiles a lot more. 1070 if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) { 1071 FLAG_SET_DEFAULT(ReservedCodeCacheSize, ReservedCodeCacheSize * 2); 1072 } 1073 } 1074 1075 #if INCLUDE_ALTERNATE_GCS 1076 static void disable_adaptive_size_policy(const char* collector_name) { 1077 if (UseAdaptiveSizePolicy) { 1078 if (FLAG_IS_CMDLINE(UseAdaptiveSizePolicy)) { 1079 warning("disabling UseAdaptiveSizePolicy; it is incompatible with %s.", 1080 collector_name); 1081 } 1082 FLAG_SET_DEFAULT(UseAdaptiveSizePolicy, false); 1083 } 1084 } 1085 1086 // If the user has chosen ParallelGCThreads > 0, we set UseParNewGC 1087 // if it's not explictly set or unset. If the user has chosen 1088 // UseParNewGC and not explicitly set ParallelGCThreads we 1089 // set it, unless this is a single cpu machine. 1090 void Arguments::set_parnew_gc_flags() { 1091 assert(!UseSerialGC && !UseParallelOldGC && !UseParallelGC && !UseG1GC, 1092 "control point invariant"); 1093 assert(UseParNewGC, "Error"); 1094 1095 // Turn off AdaptiveSizePolicy for parnew until it is complete. 1096 disable_adaptive_size_policy("UseParNewGC"); 1097 1098 if (ParallelGCThreads == 0) { 1099 FLAG_SET_DEFAULT(ParallelGCThreads, 1100 Abstract_VM_Version::parallel_worker_threads()); 1101 if (ParallelGCThreads == 1) { 1102 FLAG_SET_DEFAULT(UseParNewGC, false); 1103 FLAG_SET_DEFAULT(ParallelGCThreads, 0); 1104 } 1105 } 1106 if (UseParNewGC) { 1107 // By default YoungPLABSize and OldPLABSize are set to 4096 and 1024 respectively, 1108 // these settings are default for Parallel Scavenger. For ParNew+Tenured configuration 1109 // we set them to 1024 and 1024. 1110 // See CR 6362902. 1111 if (FLAG_IS_DEFAULT(YoungPLABSize)) { 1112 FLAG_SET_DEFAULT(YoungPLABSize, (intx)1024); 1113 } 1114 if (FLAG_IS_DEFAULT(OldPLABSize)) { 1115 FLAG_SET_DEFAULT(OldPLABSize, (intx)1024); 1116 } 1117 1118 // AlwaysTenure flag should make ParNew promote all at first collection. 1119 // See CR 6362902. 1120 if (AlwaysTenure) { 1121 FLAG_SET_CMDLINE(uintx, MaxTenuringThreshold, 0); 1122 } 1123 // When using compressed oops, we use local overflow stacks, 1124 // rather than using a global overflow list chained through 1125 // the klass word of the object's pre-image. | 1066 vm_exit_during_initialization( 1067 "Incompatible compilation policy selected", NULL); 1068 } 1069 // Increase the code cache size - tiered compiles a lot more. 1070 if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) { 1071 FLAG_SET_DEFAULT(ReservedCodeCacheSize, ReservedCodeCacheSize * 2); 1072 } 1073 } 1074 1075 #if INCLUDE_ALTERNATE_GCS 1076 static void disable_adaptive_size_policy(const char* collector_name) { 1077 if (UseAdaptiveSizePolicy) { 1078 if (FLAG_IS_CMDLINE(UseAdaptiveSizePolicy)) { 1079 warning("disabling UseAdaptiveSizePolicy; it is incompatible with %s.", 1080 collector_name); 1081 } 1082 FLAG_SET_DEFAULT(UseAdaptiveSizePolicy, false); 1083 } 1084 } 1085 1086 void Arguments::set_parnew_gc_flags() { 1087 assert(!UseSerialGC && !UseParallelOldGC && !UseParallelGC && !UseG1GC, 1088 "control point invariant"); 1089 assert(UseParNewGC, "Error"); 1090 1091 // Turn off AdaptiveSizePolicy for parnew until it is complete. 1092 disable_adaptive_size_policy("UseParNewGC"); 1093 1094 if (FLAG_IS_DEFAULT(ParallelGCThreads)) { 1095 assert(ParallelGCThreads == 0, "Default value for ParallelGCThreads should be 0"); 1096 uint par_gc_threads = Abstract_VM_Version::parallel_worker_threads(); 1097 if (par_gc_threads > 1) { 1098 FLAG_SET_DEFAULT(ParallelGCThreads, par_gc_threads); 1099 } 1100 } 1101 1102 if (UseParNewGC) { 1103 // By default YoungPLABSize and OldPLABSize are set to 4096 and 1024 respectively, 1104 // these settings are default for Parallel Scavenger. For ParNew+Tenured configuration 1105 // we set them to 1024 and 1024. 1106 // See CR 6362902. 1107 if (FLAG_IS_DEFAULT(YoungPLABSize)) { 1108 FLAG_SET_DEFAULT(YoungPLABSize, (intx)1024); 1109 } 1110 if (FLAG_IS_DEFAULT(OldPLABSize)) { 1111 FLAG_SET_DEFAULT(OldPLABSize, (intx)1024); 1112 } 1113 1114 // AlwaysTenure flag should make ParNew promote all at first collection. 1115 // See CR 6362902. 1116 if (AlwaysTenure) { 1117 FLAG_SET_CMDLINE(uintx, MaxTenuringThreshold, 0); 1118 } 1119 // When using compressed oops, we use local overflow stacks, 1120 // rather than using a global overflow list chained through 1121 // the klass word of the object's pre-image. |