Mercurial > hg > truffle
comparison src/share/vm/runtime/arguments.cpp @ 845:df6caf649ff7
6700789: G1: Enable use of compressed oops with G1 heaps
Summary: Modifications to G1 so as to allow the use of compressed oops.
Reviewed-by: apetrusenko, coleenp, jmasa, kvn, never, phh, tonyp
author | ysr |
---|---|
date | Tue, 14 Jul 2009 15:40:39 -0700 |
parents | 20c6f43950b5 |
children | 061cd4d965fc |
comparison
equal
deleted
inserted
replaced
839:bb18957ad21e | 845:df6caf649ff7 |
---|---|
1200 no_shared_spaces(); | 1200 no_shared_spaces(); |
1201 } | 1201 } |
1202 } | 1202 } |
1203 | 1203 |
1204 #ifdef _LP64 | 1204 #ifdef _LP64 |
1205 // Compressed Headers do not work with CMS, which uses a bit in the klass | |
1206 // field offset to determine free list chunk markers. | |
1207 // Check that UseCompressedOops can be set with the max heap size allocated | 1205 // Check that UseCompressedOops can be set with the max heap size allocated |
1208 // by ergonomics. | 1206 // by ergonomics. |
1209 if (MaxHeapSize <= max_heap_for_compressed_oops()) { | 1207 if (MaxHeapSize <= max_heap_for_compressed_oops()) { |
1210 if (FLAG_IS_DEFAULT(UseCompressedOops) && !UseG1GC) { | 1208 if (FLAG_IS_DEFAULT(UseCompressedOops)) { |
1211 // Turn off until bug is fixed. | 1209 // Turn off until bug is fixed. |
1212 // the following line to return it to default status. | 1210 // the following line to return it to default status. |
1213 // FLAG_SET_ERGO(bool, UseCompressedOops, true); | 1211 // FLAG_SET_ERGO(bool, UseCompressedOops, true); |
1214 } else if (UseCompressedOops && UseG1GC) { | |
1215 warning(" UseCompressedOops does not currently work with UseG1GC; switching off UseCompressedOops. "); | |
1216 FLAG_SET_DEFAULT(UseCompressedOops, false); | |
1217 } | 1212 } |
1218 #ifdef _WIN64 | 1213 #ifdef _WIN64 |
1219 if (UseLargePages && UseCompressedOops) { | 1214 if (UseLargePages && UseCompressedOops) { |
1220 // Cannot allocate guard pages for implicit checks in indexed addressing | 1215 // Cannot allocate guard pages for implicit checks in indexed addressing |
1221 // mode, when large pages are specified on windows. | 1216 // mode, when large pages are specified on windows. |
1452 // select conflicting combinations. | 1447 // select conflicting combinations. |
1453 uint i = 0; | 1448 uint i = 0; |
1454 if (UseSerialGC) i++; | 1449 if (UseSerialGC) i++; |
1455 if (UseConcMarkSweepGC || UseParNewGC) i++; | 1450 if (UseConcMarkSweepGC || UseParNewGC) i++; |
1456 if (UseParallelGC || UseParallelOldGC) i++; | 1451 if (UseParallelGC || UseParallelOldGC) i++; |
1452 if (UseG1GC) i++; | |
1457 if (i > 1) { | 1453 if (i > 1) { |
1458 jio_fprintf(defaultStream::error_stream(), | 1454 jio_fprintf(defaultStream::error_stream(), |
1459 "Conflicting collector combinations in option list; " | 1455 "Conflicting collector combinations in option list; " |
1460 "please refer to the release notes for the combinations " | 1456 "please refer to the release notes for the combinations " |
1461 "allowed\n"); | 1457 "allowed\n"); |
2601 jint result = parse_vm_init_args(args); | 2597 jint result = parse_vm_init_args(args); |
2602 if (result != JNI_OK) { | 2598 if (result != JNI_OK) { |
2603 return result; | 2599 return result; |
2604 } | 2600 } |
2605 | 2601 |
2606 // These are hacks until G1 is fully supported and tested | |
2607 // but lets you force -XX:+UseG1GC in PRT and get it where it (mostly) works | |
2608 if (UseG1GC) { | |
2609 if (UseConcMarkSweepGC || UseParNewGC || UseParallelGC || UseParallelOldGC || UseSerialGC) { | |
2610 #ifndef PRODUCT | |
2611 tty->print_cr("-XX:+UseG1GC is incompatible with other collectors, using UseG1GC"); | |
2612 #endif // PRODUCT | |
2613 UseConcMarkSweepGC = false; | |
2614 UseParNewGC = false; | |
2615 UseParallelGC = false; | |
2616 UseParallelOldGC = false; | |
2617 UseSerialGC = false; | |
2618 } | |
2619 no_shared_spaces(); | |
2620 } | |
2621 | |
2622 #ifndef PRODUCT | 2602 #ifndef PRODUCT |
2623 if (TraceBytecodesAt != 0) { | 2603 if (TraceBytecodesAt != 0) { |
2624 TraceBytecodes = true; | 2604 TraceBytecodes = true; |
2625 } | 2605 } |
2626 if (CountCompiledCalls) { | 2606 if (CountCompiledCalls) { |
2674 // Set some flags for CMS | 2654 // Set some flags for CMS |
2675 set_cms_and_parnew_gc_flags(); | 2655 set_cms_and_parnew_gc_flags(); |
2676 } else if (UseParNewGC) { | 2656 } else if (UseParNewGC) { |
2677 // Set some flags for ParNew | 2657 // Set some flags for ParNew |
2678 set_parnew_gc_flags(); | 2658 set_parnew_gc_flags(); |
2679 } | 2659 } else if (UseG1GC) { |
2680 // Temporary; make the "if" an "else-if" before | |
2681 // we integrate G1. XXX | |
2682 if (UseG1GC) { | |
2683 // Set some flags for garbage-first, if needed. | 2660 // Set some flags for garbage-first, if needed. |
2684 set_g1_gc_flags(); | 2661 set_g1_gc_flags(); |
2685 } | 2662 } |
2686 | 2663 |
2687 #ifdef SERIALGC | 2664 #ifdef SERIALGC |