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