< prev index next >

src/cpu/ppc/vm/vm_version_ppc.cpp

Print this page
rev 13277 : 8184800: Streamline RTM flag validity testing with generic flag testing support


 310     }
 311 #endif
 312     if (os_too_old) {
 313       vm_exit_during_initialization("RTM is not supported on this OS version.");
 314     }
 315   }
 316 
 317   if (UseRTMLocking) {
 318 #if INCLUDE_RTM_OPT
 319     if (!UnlockExperimentalVMOptions) {
 320       vm_exit_during_initialization("UseRTMLocking is only available as experimental option on this platform. "
 321                                     "It must be enabled via -XX:+UnlockExperimentalVMOptions flag.");
 322     } else {
 323       warning("UseRTMLocking is only available as experimental option on this platform.");
 324     }
 325     if (!FLAG_IS_CMDLINE(UseRTMLocking)) {
 326       // RTM locking should be used only for applications with
 327       // high lock contention. For now we do not use it by default.
 328       vm_exit_during_initialization("UseRTMLocking flag should be only set on command line");
 329     }
 330     if (!is_power_of_2(RTMTotalCountIncrRate)) {
 331       warning("RTMTotalCountIncrRate must be a power of 2, resetting it to 64");
 332       FLAG_SET_DEFAULT(RTMTotalCountIncrRate, 64);
 333     }
 334     if (RTMAbortRatio < 0 || RTMAbortRatio > 100) {
 335       warning("RTMAbortRatio must be in the range 0 to 100, resetting it to 50");
 336       FLAG_SET_DEFAULT(RTMAbortRatio, 50);
 337     }
 338     if (RTMSpinLoopCount < 0) {
 339       warning("RTMSpinLoopCount must not be a negative value, resetting it to 0");
 340       FLAG_SET_DEFAULT(RTMSpinLoopCount, 0);
 341     }
 342 #else
 343     // Only C2 does RTM locking optimization.
 344     // Can't continue because UseRTMLocking affects UseBiasedLocking flag
 345     // setting during arguments processing. See use_biased_locking().
 346     vm_exit_during_initialization("RTM locking optimization is not supported in this VM");
 347 #endif
 348   } else { // !UseRTMLocking
 349     if (UseRTMForStackLocks) {
 350       if (!FLAG_IS_DEFAULT(UseRTMForStackLocks)) {
 351         warning("UseRTMForStackLocks flag should be off when UseRTMLocking flag is off");
 352       }
 353       FLAG_SET_DEFAULT(UseRTMForStackLocks, false);
 354     }
 355     if (UseRTMDeopt) {
 356       FLAG_SET_DEFAULT(UseRTMDeopt, false);
 357     }
 358     if (PrintPreciseRTMLockingStatistics) {
 359       FLAG_SET_DEFAULT(PrintPreciseRTMLockingStatistics, false);
 360     }
 361   }




 310     }
 311 #endif
 312     if (os_too_old) {
 313       vm_exit_during_initialization("RTM is not supported on this OS version.");
 314     }
 315   }
 316 
 317   if (UseRTMLocking) {
 318 #if INCLUDE_RTM_OPT
 319     if (!UnlockExperimentalVMOptions) {
 320       vm_exit_during_initialization("UseRTMLocking is only available as experimental option on this platform. "
 321                                     "It must be enabled via -XX:+UnlockExperimentalVMOptions flag.");
 322     } else {
 323       warning("UseRTMLocking is only available as experimental option on this platform.");
 324     }
 325     if (!FLAG_IS_CMDLINE(UseRTMLocking)) {
 326       // RTM locking should be used only for applications with
 327       // high lock contention. For now we do not use it by default.
 328       vm_exit_during_initialization("UseRTMLocking flag should be only set on command line");
 329     }












 330 #else
 331     // Only C2 does RTM locking optimization.
 332     // Can't continue because UseRTMLocking affects UseBiasedLocking flag
 333     // setting during arguments processing. See use_biased_locking().
 334     vm_exit_during_initialization("RTM locking optimization is not supported in this VM");
 335 #endif
 336   } else { // !UseRTMLocking
 337     if (UseRTMForStackLocks) {
 338       if (!FLAG_IS_DEFAULT(UseRTMForStackLocks)) {
 339         warning("UseRTMForStackLocks flag should be off when UseRTMLocking flag is off");
 340       }
 341       FLAG_SET_DEFAULT(UseRTMForStackLocks, false);
 342     }
 343     if (UseRTMDeopt) {
 344       FLAG_SET_DEFAULT(UseRTMDeopt, false);
 345     }
 346     if (PrintPreciseRTMLockingStatistics) {
 347       FLAG_SET_DEFAULT(PrintPreciseRTMLockingStatistics, false);
 348     }
 349   }


< prev index next >