< prev index next >

src/hotspot/share/runtime/arguments.cpp

Print this page

3786   if (UseCompactObjectHeaders && FLAG_IS_CMDLINE(UseCompressedClassPointers) && !UseCompressedClassPointers) {
3787     warning("Compact object headers require compressed class pointers. Disabling compact object headers.");
3788     FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
3789   }
3790   if (UseCompactObjectHeaders && !UseObjectMonitorTable) {
3791     // If UseCompactObjectHeaders is on the command line, turn on UseObjectMonitorTable.
3792     if (FLAG_IS_CMDLINE(UseCompactObjectHeaders)) {
3793       FLAG_SET_DEFAULT(UseObjectMonitorTable, true);
3794 
3795       // If UseObjectMonitorTable is on the command line, turn off UseCompactObjectHeaders.
3796     } else if (FLAG_IS_CMDLINE(UseObjectMonitorTable)) {
3797       FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
3798       // If neither on the command line, the defaults are incompatible, but turn on UseObjectMonitorTable.
3799     } else {
3800       FLAG_SET_DEFAULT(UseObjectMonitorTable, true);
3801     }
3802   }
3803   if (UseCompactObjectHeaders && !UseCompressedClassPointers) {
3804     FLAG_SET_DEFAULT(UseCompressedClassPointers, true);
3805   }






3806 #endif
3807 }
3808 
3809 jint Arguments::apply_ergo() {
3810   // Set flags based on ergonomics.
3811   jint result = set_ergonomics_flags();
3812   if (result != JNI_OK) return result;
3813 
3814   // Set heap size based on available physical memory
3815   set_heap_size();
3816 
3817   GCConfig::arguments()->initialize();
3818 
3819   set_compact_headers_flags();
3820 
3821   if (UseCompressedClassPointers) {
3822     CompressedKlassPointers::pre_initialize();
3823   }
3824 
3825   CDSConfig::ergo_initialize();

3786   if (UseCompactObjectHeaders && FLAG_IS_CMDLINE(UseCompressedClassPointers) && !UseCompressedClassPointers) {
3787     warning("Compact object headers require compressed class pointers. Disabling compact object headers.");
3788     FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
3789   }
3790   if (UseCompactObjectHeaders && !UseObjectMonitorTable) {
3791     // If UseCompactObjectHeaders is on the command line, turn on UseObjectMonitorTable.
3792     if (FLAG_IS_CMDLINE(UseCompactObjectHeaders)) {
3793       FLAG_SET_DEFAULT(UseObjectMonitorTable, true);
3794 
3795       // If UseObjectMonitorTable is on the command line, turn off UseCompactObjectHeaders.
3796     } else if (FLAG_IS_CMDLINE(UseObjectMonitorTable)) {
3797       FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
3798       // If neither on the command line, the defaults are incompatible, but turn on UseObjectMonitorTable.
3799     } else {
3800       FLAG_SET_DEFAULT(UseObjectMonitorTable, true);
3801     }
3802   }
3803   if (UseCompactObjectHeaders && !UseCompressedClassPointers) {
3804     FLAG_SET_DEFAULT(UseCompressedClassPointers, true);
3805   }
3806   if (UseCompactObjectHeaders && FLAG_IS_DEFAULT(hashCode)) {
3807     hashCode = 6;
3808   }
3809   if (UseCompactObjectHeaders && FLAG_IS_DEFAULT(CompressedClassSpaceSize)) {
3810     FLAG_SET_DEFAULT(CompressedClassSpaceSize, CompressedKlassPointers::max_klass_range_size_coh);
3811   }
3812 #endif
3813 }
3814 
3815 jint Arguments::apply_ergo() {
3816   // Set flags based on ergonomics.
3817   jint result = set_ergonomics_flags();
3818   if (result != JNI_OK) return result;
3819 
3820   // Set heap size based on available physical memory
3821   set_heap_size();
3822 
3823   GCConfig::arguments()->initialize();
3824 
3825   set_compact_headers_flags();
3826 
3827   if (UseCompressedClassPointers) {
3828     CompressedKlassPointers::pre_initialize();
3829   }
3830 
3831   CDSConfig::ergo_initialize();
< prev index next >