comparison src/share/vm/runtime/arguments.cpp @ 113:ba764ed4b6f2

6420645: Create a vm that uses compressed oops for up to 32gb heapsizes Summary: Compressed oops in instances, arrays, and headers. Code contributors are coleenp, phh, never, swamyv Reviewed-by: jmasa, kamg, acorn, tbell, kvn, rasbold
author coleenp
date Sun, 13 Apr 2008 17:43:42 -0400
parents d6fe2e4959d6
children b7268662a986
comparison
equal deleted inserted replaced
110:a49a647afe9a 113:ba764ed4b6f2
1161 FLAG_SET_ERGO(bool, UseParallelGC, true); 1161 FLAG_SET_ERGO(bool, UseParallelGC, true);
1162 } 1162 }
1163 no_shared_spaces(); 1163 no_shared_spaces();
1164 } 1164 }
1165 } 1165 }
1166
1167 #ifdef _LP64
1168 // Compressed Headers do not work with CMS, which uses a bit in the klass
1169 // field offset to determine free list chunk markers.
1170 // Check that UseCompressedOops can be set with the max heap size allocated
1171 // by ergonomics.
1172 if (!UseConcMarkSweepGC && MaxHeapSize <= (32*G - os::vm_page_size())) {
1173 if (FLAG_IS_DEFAULT(UseCompressedOops)) {
1174 FLAG_SET_ERGO(bool, UseCompressedOops, true);
1175 }
1176 } else {
1177 if (UseCompressedOops && !FLAG_IS_DEFAULT(UseCompressedOops)) {
1178 // If specified, give a warning
1179 if (UseConcMarkSweepGC){
1180 warning("Compressed Oops does not work with CMS");
1181 } else {
1182 warning(
1183 "Max heap size too large for Compressed Oops");
1184 }
1185 FLAG_SET_DEFAULT(UseCompressedOops, false);
1186 }
1187 }
1188 // Also checks that certain machines are slower with compressed oops
1189 // in vm_version initialization code.
1190 #endif // _LP64
1166 } 1191 }
1167 1192
1168 void Arguments::set_parallel_gc_flags() { 1193 void Arguments::set_parallel_gc_flags() {
1169 // If parallel old was requested, automatically enable parallel scavenge. 1194 // If parallel old was requested, automatically enable parallel scavenge.
1170 if (UseParallelOldGC && !UseParallelGC && FLAG_IS_DEFAULT(UseParallelGC)) { 1195 if (UseParallelOldGC && !UseParallelGC && FLAG_IS_DEFAULT(UseParallelGC)) {