3801 if (UseCompactObjectHeaders && FLAG_IS_CMDLINE(UseCompressedClassPointers) && !UseCompressedClassPointers) {
3802 warning("Compact object headers require compressed class pointers. Disabling compact object headers.");
3803 FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
3804 }
3805 if (UseCompactObjectHeaders && !UseObjectMonitorTable) {
3806 // If UseCompactObjectHeaders is on the command line, turn on UseObjectMonitorTable.
3807 if (FLAG_IS_CMDLINE(UseCompactObjectHeaders)) {
3808 FLAG_SET_DEFAULT(UseObjectMonitorTable, true);
3809
3810 // If UseObjectMonitorTable is on the command line, turn off UseCompactObjectHeaders.
3811 } else if (FLAG_IS_CMDLINE(UseObjectMonitorTable)) {
3812 FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
3813 // If neither on the command line, the defaults are incompatible, but turn on UseObjectMonitorTable.
3814 } else {
3815 FLAG_SET_DEFAULT(UseObjectMonitorTable, true);
3816 }
3817 }
3818 if (UseCompactObjectHeaders && !UseCompressedClassPointers) {
3819 FLAG_SET_DEFAULT(UseCompressedClassPointers, true);
3820 }
3821 #endif
3822 }
3823
3824 jint Arguments::apply_ergo() {
3825 // Set flags based on ergonomics.
3826 jint result = set_ergonomics_flags();
3827 if (result != JNI_OK) return result;
3828
3829 // Set heap size based on available physical memory
3830 set_heap_size();
3831
3832 GCConfig::arguments()->initialize();
3833
3834 set_compact_headers_flags();
3835
3836 if (UseCompressedClassPointers) {
3837 CompressedKlassPointers::pre_initialize();
3838 }
3839
3840 CDSConfig::ergo_initialize();
|
3801 if (UseCompactObjectHeaders && FLAG_IS_CMDLINE(UseCompressedClassPointers) && !UseCompressedClassPointers) {
3802 warning("Compact object headers require compressed class pointers. Disabling compact object headers.");
3803 FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
3804 }
3805 if (UseCompactObjectHeaders && !UseObjectMonitorTable) {
3806 // If UseCompactObjectHeaders is on the command line, turn on UseObjectMonitorTable.
3807 if (FLAG_IS_CMDLINE(UseCompactObjectHeaders)) {
3808 FLAG_SET_DEFAULT(UseObjectMonitorTable, true);
3809
3810 // If UseObjectMonitorTable is on the command line, turn off UseCompactObjectHeaders.
3811 } else if (FLAG_IS_CMDLINE(UseObjectMonitorTable)) {
3812 FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
3813 // If neither on the command line, the defaults are incompatible, but turn on UseObjectMonitorTable.
3814 } else {
3815 FLAG_SET_DEFAULT(UseObjectMonitorTable, true);
3816 }
3817 }
3818 if (UseCompactObjectHeaders && !UseCompressedClassPointers) {
3819 FLAG_SET_DEFAULT(UseCompressedClassPointers, true);
3820 }
3821 if (UseCompactObjectHeaders && FLAG_IS_DEFAULT(hashCode)) {
3822 hashCode = 6;
3823 }
3824 if (UseCompactObjectHeaders && FLAG_IS_DEFAULT(CompressedClassSpaceSize)) {
3825 FLAG_SET_DEFAULT(CompressedClassSpaceSize, CompressedKlassPointers::max_klass_range_size_coh);
3826 }
3827 #endif
3828 }
3829
3830 jint Arguments::apply_ergo() {
3831 // Set flags based on ergonomics.
3832 jint result = set_ergonomics_flags();
3833 if (result != JNI_OK) return result;
3834
3835 // Set heap size based on available physical memory
3836 set_heap_size();
3837
3838 GCConfig::arguments()->initialize();
3839
3840 set_compact_headers_flags();
3841
3842 if (UseCompressedClassPointers) {
3843 CompressedKlassPointers::pre_initialize();
3844 }
3845
3846 CDSConfig::ergo_initialize();
|