< prev index next >

src/hotspot/cpu/ppc/vm_version_ppc.cpp

Print this page




 364     if (UseRTMForStackLocks) {
 365       if (!FLAG_IS_DEFAULT(UseRTMForStackLocks)) {
 366         warning("UseRTMForStackLocks flag should be off when UseRTMLocking flag is off");
 367       }
 368       FLAG_SET_DEFAULT(UseRTMForStackLocks, false);
 369     }
 370     if (UseRTMDeopt) {
 371       FLAG_SET_DEFAULT(UseRTMDeopt, false);
 372     }
 373     if (PrintPreciseRTMLockingStatistics) {
 374       FLAG_SET_DEFAULT(PrintPreciseRTMLockingStatistics, false);
 375     }
 376   }
 377 
 378   // This machine allows unaligned memory accesses
 379   if (FLAG_IS_DEFAULT(UseUnalignedAccesses)) {
 380     FLAG_SET_DEFAULT(UseUnalignedAccesses, true);
 381   }
 382 }
 383 
 384 void VM_Version::print_platform_virtualization_info(outputStream* st) {
 385   const char* info_file = "/proc/ppc64/lparcfg";
 386   const char* kw[] = { "system_type=", // qemu indicates PowerKVM
 387                        "partition_entitled_capacity=", // entitled processor capacity percentage
 388                        "partition_max_entitled_capacity=",
 389                        "capacity_weight=", // partition CPU weight
 390                        "partition_active_processors=",
 391                        "partition_potential_processors=",
 392                        "entitled_proc_capacity_available=",
 393                        "capped=", // 0 - uncapped, 1 - vcpus capped at entitled processor capacity percentage
 394                        "shared_processor_mode=", // (non)dedicated partition
 395                        "system_potential_processors=",
 396                        "pool=", // CPU-pool number
 397                        "pool_capacity=",
 398                        "NumLpars=", // on non-KVM machines, NumLpars is not found for full partition mode machines
 399                        NULL };
 400   if (!print_matching_lines_from_file(info_file, st, kw)) {
 401     st->print_cr("  <%s Not Available>", info_file);
 402   }
 403 }
 404 
 405 bool VM_Version::use_biased_locking() {
 406 #if INCLUDE_RTM_OPT
 407   // RTM locking is most useful when there is high lock contention and
 408   // low data contention. With high lock contention the lock is usually
 409   // inflated and biased locking is not suitable for that case.
 410   // RTM locking code requires that biased locking is off.
 411   // Note: we can't switch off UseBiasedLocking in get_processor_features()
 412   // because it is used by Thread::allocate() which is called before
 413   // VM_Version::initialize().
 414   if (UseRTMLocking && UseBiasedLocking) {
 415     if (FLAG_IS_DEFAULT(UseBiasedLocking)) {
 416       FLAG_SET_DEFAULT(UseBiasedLocking, false);
 417     } else {
 418       warning("Biased locking is not supported with RTM locking; ignoring UseBiasedLocking flag." );
 419       UseBiasedLocking = false;
 420     }
 421   }
 422 #endif
 423   return UseBiasedLocking;
 424 }




 364     if (UseRTMForStackLocks) {
 365       if (!FLAG_IS_DEFAULT(UseRTMForStackLocks)) {
 366         warning("UseRTMForStackLocks flag should be off when UseRTMLocking flag is off");
 367       }
 368       FLAG_SET_DEFAULT(UseRTMForStackLocks, false);
 369     }
 370     if (UseRTMDeopt) {
 371       FLAG_SET_DEFAULT(UseRTMDeopt, false);
 372     }
 373     if (PrintPreciseRTMLockingStatistics) {
 374       FLAG_SET_DEFAULT(PrintPreciseRTMLockingStatistics, false);
 375     }
 376   }
 377 
 378   // This machine allows unaligned memory accesses
 379   if (FLAG_IS_DEFAULT(UseUnalignedAccesses)) {
 380     FLAG_SET_DEFAULT(UseUnalignedAccesses, true);
 381   }
 382 }
 383 





















 384 bool VM_Version::use_biased_locking() {
 385 #if INCLUDE_RTM_OPT
 386   // RTM locking is most useful when there is high lock contention and
 387   // low data contention. With high lock contention the lock is usually
 388   // inflated and biased locking is not suitable for that case.
 389   // RTM locking code requires that biased locking is off.
 390   // Note: we can't switch off UseBiasedLocking in get_processor_features()
 391   // because it is used by Thread::allocate() which is called before
 392   // VM_Version::initialize().
 393   if (UseRTMLocking && UseBiasedLocking) {
 394     if (FLAG_IS_DEFAULT(UseBiasedLocking)) {
 395       FLAG_SET_DEFAULT(UseBiasedLocking, false);
 396     } else {
 397       warning("Biased locking is not supported with RTM locking; ignoring UseBiasedLocking flag." );
 398       UseBiasedLocking = false;
 399     }
 400   }
 401 #endif
 402   return UseBiasedLocking;
 403 }


< prev index next >