3672 }
3673 if (UseCompactObjectHeaders && !UseObjectMonitorTable) {
3674 // If UseCompactObjectHeaders is on the command line, turn on UseObjectMonitorTable.
3675 if (FLAG_IS_CMDLINE(UseCompactObjectHeaders)) {
3676 FLAG_SET_DEFAULT(UseObjectMonitorTable, true);
3677
3678 // If UseObjectMonitorTable is on the command line, turn off UseCompactObjectHeaders.
3679 } else if (FLAG_IS_CMDLINE(UseObjectMonitorTable)) {
3680 FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
3681 // If neither on the command line, the defaults are incompatible, but turn on UseObjectMonitorTable.
3682 } else {
3683 FLAG_SET_DEFAULT(UseObjectMonitorTable, true);
3684 }
3685 }
3686 if (UseCompactObjectHeaders && LockingMode != LM_LIGHTWEIGHT) {
3687 FLAG_SET_DEFAULT(LockingMode, LM_LIGHTWEIGHT);
3688 }
3689 if (UseCompactObjectHeaders && !UseCompressedClassPointers) {
3690 FLAG_SET_DEFAULT(UseCompressedClassPointers, true);
3691 }
3692 #endif
3693 }
3694
3695 jint Arguments::apply_ergo() {
3696 // Set flags based on ergonomics.
3697 jint result = set_ergonomics_flags();
3698 if (result != JNI_OK) return result;
3699
3700 // Set heap size based on available physical memory
3701 set_heap_size();
3702
3703 GCConfig::arguments()->initialize();
3704
3705 set_compact_headers_flags();
3706
3707 if (UseCompressedClassPointers) {
3708 CompressedKlassPointers::pre_initialize();
3709 }
3710
3711 CDSConfig::initialize();
|
3672 }
3673 if (UseCompactObjectHeaders && !UseObjectMonitorTable) {
3674 // If UseCompactObjectHeaders is on the command line, turn on UseObjectMonitorTable.
3675 if (FLAG_IS_CMDLINE(UseCompactObjectHeaders)) {
3676 FLAG_SET_DEFAULT(UseObjectMonitorTable, true);
3677
3678 // If UseObjectMonitorTable is on the command line, turn off UseCompactObjectHeaders.
3679 } else if (FLAG_IS_CMDLINE(UseObjectMonitorTable)) {
3680 FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
3681 // If neither on the command line, the defaults are incompatible, but turn on UseObjectMonitorTable.
3682 } else {
3683 FLAG_SET_DEFAULT(UseObjectMonitorTable, true);
3684 }
3685 }
3686 if (UseCompactObjectHeaders && LockingMode != LM_LIGHTWEIGHT) {
3687 FLAG_SET_DEFAULT(LockingMode, LM_LIGHTWEIGHT);
3688 }
3689 if (UseCompactObjectHeaders && !UseCompressedClassPointers) {
3690 FLAG_SET_DEFAULT(UseCompressedClassPointers, true);
3691 }
3692 if (UseCompactObjectHeaders && FLAG_IS_DEFAULT(hashCode)) {
3693 hashCode = 6;
3694 }
3695 #endif
3696 }
3697
3698 jint Arguments::apply_ergo() {
3699 // Set flags based on ergonomics.
3700 jint result = set_ergonomics_flags();
3701 if (result != JNI_OK) return result;
3702
3703 // Set heap size based on available physical memory
3704 set_heap_size();
3705
3706 GCConfig::arguments()->initialize();
3707
3708 set_compact_headers_flags();
3709
3710 if (UseCompressedClassPointers) {
3711 CompressedKlassPointers::pre_initialize();
3712 }
3713
3714 CDSConfig::initialize();
|