hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp
changeset 35135 dd2ce9021031
parent 35110 f19bcdf40799
parent 35063 cb24277be2e7
child 35148 5cfafc99d791
--- a/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp	Thu Dec 17 23:36:28 2015 +0000
+++ b/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp	Fri Dec 18 12:39:02 2015 -0800
@@ -229,12 +229,27 @@
   }
 
   // Adjust RTM (Restricted Transactional Memory) flags.
-  if (!has_tcheck() && UseRTMLocking) {
+  if (UseRTMLocking) {
+    // If CPU or OS are too old:
     // Can't continue because UseRTMLocking affects UseBiasedLocking flag
     // setting during arguments processing. See use_biased_locking().
     // VM_Version_init() is executed after UseBiasedLocking is used
     // in Thread::allocate().
-    vm_exit_during_initialization("RTM instructions are not available on this CPU");
+    if (!has_tcheck()) {
+      vm_exit_during_initialization("RTM instructions are not available on this CPU");
+    }
+    bool os_too_old = true;
+#ifdef AIX
+    if (os::Aix::os_version() >= 0x0701031e) { // at least AIX 7.1.3.30
+      os_too_old = false;
+    }
+#endif
+#ifdef linux
+    // TODO: check kernel version (we currently have too old versions only)
+#endif
+    if (os_too_old) {
+      vm_exit_during_initialization("RTM is not supported on this OS version.");
+    }
   }
 
   if (UseRTMLocking) {