257 }
258
259 if (UseVectorizedMismatchIntrinsic) {
260 warning("UseVectorizedMismatchIntrinsic specified, but not available on this CPU.");
261 FLAG_SET_DEFAULT(UseVectorizedMismatchIntrinsic, false);
262 }
263
264
265 // Adjust RTM (Restricted Transactional Memory) flags.
266 if (UseRTMLocking) {
267 // If CPU or OS are too old:
268 // Can't continue because UseRTMLocking affects UseBiasedLocking flag
269 // setting during arguments processing. See use_biased_locking().
270 // VM_Version_init() is executed after UseBiasedLocking is used
271 // in Thread::allocate().
272 if (!has_tcheck()) {
273 vm_exit_during_initialization("RTM instructions are not available on this CPU");
274 }
275 bool os_too_old = true;
276 #ifdef AIX
277 if (os::Aix::os_version() >= 0x0701031e) { // at least AIX 7.1.3.30
278 os_too_old = false;
279 }
280 #endif
281 #ifdef LINUX
282 // At least Linux kernel 4.2, as the problematic behavior of syscalls
283 // being called in the middle of a transaction has been addressed.
284 // Please, refer to commit b4b56f9ecab40f3b4ef53e130c9f6663be491894
285 // in Linux kernel source tree: https://goo.gl/Kc5i7A
286 if (os::Linux::os_version_is_known()) {
287 if (os::Linux::os_version() >= 0x040200)
288 os_too_old = false;
289 } else {
290 vm_exit_during_initialization("RTM can not be enabled: kernel version is unknown.");
291 }
292 #endif
293 if (os_too_old) {
294 vm_exit_during_initialization("RTM is not supported on this OS version.");
295 }
296 }
297
|
257 }
258
259 if (UseVectorizedMismatchIntrinsic) {
260 warning("UseVectorizedMismatchIntrinsic specified, but not available on this CPU.");
261 FLAG_SET_DEFAULT(UseVectorizedMismatchIntrinsic, false);
262 }
263
264
265 // Adjust RTM (Restricted Transactional Memory) flags.
266 if (UseRTMLocking) {
267 // If CPU or OS are too old:
268 // Can't continue because UseRTMLocking affects UseBiasedLocking flag
269 // setting during arguments processing. See use_biased_locking().
270 // VM_Version_init() is executed after UseBiasedLocking is used
271 // in Thread::allocate().
272 if (!has_tcheck()) {
273 vm_exit_during_initialization("RTM instructions are not available on this CPU");
274 }
275 bool os_too_old = true;
276 #ifdef AIX
277 // Actually, this is supported since AIX 7.1.. Unfortunately, this first
278 // contained bugs, so that it can only be enabled after AIX 7.1.3.30.
279 // The Java property os.version, which is used in RTM tests to decide
280 // whether the feature is available, only knows major and minor versions.
281 // We don't want to change this property, as user code might depend on it.
282 // So the tests can not check on subversion 3.30, and we only enable RTM
283 // with AIX 7.2.
284 if (os::Aix::os_version() >= 0x07020000) { // At least AIX 7.2.
285 os_too_old = false;
286 }
287 #endif
288 #ifdef LINUX
289 // At least Linux kernel 4.2, as the problematic behavior of syscalls
290 // being called in the middle of a transaction has been addressed.
291 // Please, refer to commit b4b56f9ecab40f3b4ef53e130c9f6663be491894
292 // in Linux kernel source tree: https://goo.gl/Kc5i7A
293 if (os::Linux::os_version_is_known()) {
294 if (os::Linux::os_version() >= 0x040200)
295 os_too_old = false;
296 } else {
297 vm_exit_during_initialization("RTM can not be enabled: kernel version is unknown.");
298 }
299 #endif
300 if (os_too_old) {
301 vm_exit_during_initialization("RTM is not supported on this OS version.");
302 }
303 }
304
|