3748 if (UseCompactObjectHeaders && FLAG_IS_CMDLINE(UseCompressedClassPointers) && !UseCompressedClassPointers) {
3749 warning("Compact object headers require compressed class pointers. Disabling compact object headers.");
3750 FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
3751 }
3752 if (UseCompactObjectHeaders && !UseObjectMonitorTable) {
3753 // If UseCompactObjectHeaders is on the command line, turn on UseObjectMonitorTable.
3754 if (FLAG_IS_CMDLINE(UseCompactObjectHeaders)) {
3755 FLAG_SET_DEFAULT(UseObjectMonitorTable, true);
3756
3757 // If UseObjectMonitorTable is on the command line, turn off UseCompactObjectHeaders.
3758 } else if (FLAG_IS_CMDLINE(UseObjectMonitorTable)) {
3759 FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
3760 // If neither on the command line, the defaults are incompatible, but turn on UseObjectMonitorTable.
3761 } else {
3762 FLAG_SET_DEFAULT(UseObjectMonitorTable, true);
3763 }
3764 }
3765 if (UseCompactObjectHeaders && !UseCompressedClassPointers) {
3766 FLAG_SET_DEFAULT(UseCompressedClassPointers, true);
3767 }
3768 #endif
3769 }
3770
3771 jint Arguments::apply_ergo() {
3772 // Set flags based on ergonomics.
3773 jint result = set_ergonomics_flags();
3774 if (result != JNI_OK) return result;
3775
3776 // Set heap size based on available physical memory
3777 set_heap_size();
3778
3779 GCConfig::arguments()->initialize();
3780
3781 set_compact_headers_flags();
3782
3783 if (UseCompressedClassPointers) {
3784 CompressedKlassPointers::pre_initialize();
3785 }
3786
3787 CDSConfig::ergo_initialize();
|
3748 if (UseCompactObjectHeaders && FLAG_IS_CMDLINE(UseCompressedClassPointers) && !UseCompressedClassPointers) {
3749 warning("Compact object headers require compressed class pointers. Disabling compact object headers.");
3750 FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
3751 }
3752 if (UseCompactObjectHeaders && !UseObjectMonitorTable) {
3753 // If UseCompactObjectHeaders is on the command line, turn on UseObjectMonitorTable.
3754 if (FLAG_IS_CMDLINE(UseCompactObjectHeaders)) {
3755 FLAG_SET_DEFAULT(UseObjectMonitorTable, true);
3756
3757 // If UseObjectMonitorTable is on the command line, turn off UseCompactObjectHeaders.
3758 } else if (FLAG_IS_CMDLINE(UseObjectMonitorTable)) {
3759 FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
3760 // If neither on the command line, the defaults are incompatible, but turn on UseObjectMonitorTable.
3761 } else {
3762 FLAG_SET_DEFAULT(UseObjectMonitorTable, true);
3763 }
3764 }
3765 if (UseCompactObjectHeaders && !UseCompressedClassPointers) {
3766 FLAG_SET_DEFAULT(UseCompressedClassPointers, true);
3767 }
3768 if (UseCompactObjectHeaders && FLAG_IS_DEFAULT(hashCode)) {
3769 hashCode = 6;
3770 }
3771 if (UseCompactObjectHeaders && FLAG_IS_DEFAULT(CompressedClassSpaceSize)) {
3772 FLAG_SET_DEFAULT(CompressedClassSpaceSize, CompressedKlassPointers::max_klass_range_size_coh);
3773 }
3774 #endif
3775 }
3776
3777 jint Arguments::apply_ergo() {
3778 // Set flags based on ergonomics.
3779 jint result = set_ergonomics_flags();
3780 if (result != JNI_OK) return result;
3781
3782 // Set heap size based on available physical memory
3783 set_heap_size();
3784
3785 GCConfig::arguments()->initialize();
3786
3787 set_compact_headers_flags();
3788
3789 if (UseCompressedClassPointers) {
3790 CompressedKlassPointers::pre_initialize();
3791 }
3792
3793 CDSConfig::ergo_initialize();
|