8231264: Implementation of JEP 374: Disable biased-locking and deprecate all flags related to biased-locking
Changed default value of UseBiasedLocking to false and deprecated related flags. Reviewed-by: dholmes, dcubed
This commit is contained in:
parent
ca53ee2593
commit
398a2b3c37
@ -497,7 +497,8 @@
|
|||||||
"Print precise statistics on the dynamic lock usage") \
|
"Print precise statistics on the dynamic lock usage") \
|
||||||
\
|
\
|
||||||
diagnostic(bool, PrintPreciseBiasedLockingStatistics, false, \
|
diagnostic(bool, PrintPreciseBiasedLockingStatistics, false, \
|
||||||
"Print per-lock-site statistics of biased locking in JVM") \
|
"(Deprecated) Print per-lock-site statistics of biased locking " \
|
||||||
|
"in JVM") \
|
||||||
\
|
\
|
||||||
diagnostic(bool, PrintPreciseRTMLockingStatistics, false, \
|
diagnostic(bool, PrintPreciseRTMLockingStatistics, false, \
|
||||||
"Print per-lock-site statistics of rtm locking in JVM") \
|
"Print per-lock-site statistics of rtm locking in JVM") \
|
||||||
@ -551,7 +552,7 @@
|
|||||||
"Verify Connection Graph construction in Escape Analysis") \
|
"Verify Connection Graph construction in Escape Analysis") \
|
||||||
\
|
\
|
||||||
product(bool, UseOptoBiasInlining, true, \
|
product(bool, UseOptoBiasInlining, true, \
|
||||||
"Generate biased locking code in C2 ideal graph") \
|
"(Deprecated) Generate biased locking code in C2 ideal graph") \
|
||||||
\
|
\
|
||||||
product(bool, OptimizeStringConcat, true, \
|
product(bool, OptimizeStringConcat, true, \
|
||||||
"Optimize the construction of Strings by StringBuilder") \
|
"Optimize the construction of Strings by StringBuilder") \
|
||||||
|
@ -525,6 +525,14 @@ static SpecialFlag const special_jvm_flags[] = {
|
|||||||
{ "PrintVMQWaitTime", JDK_Version::jdk(15), JDK_Version::jdk(16), JDK_Version::jdk(17) },
|
{ "PrintVMQWaitTime", JDK_Version::jdk(15), JDK_Version::jdk(16), JDK_Version::jdk(17) },
|
||||||
{ "UseNewFieldLayout", JDK_Version::jdk(15), JDK_Version::jdk(16), JDK_Version::jdk(17) },
|
{ "UseNewFieldLayout", JDK_Version::jdk(15), JDK_Version::jdk(16), JDK_Version::jdk(17) },
|
||||||
{ "ForceNUMA", JDK_Version::jdk(15), JDK_Version::jdk(16), JDK_Version::jdk(17) },
|
{ "ForceNUMA", JDK_Version::jdk(15), JDK_Version::jdk(16), JDK_Version::jdk(17) },
|
||||||
|
{ "UseBiasedLocking", JDK_Version::jdk(15), JDK_Version::jdk(16), JDK_Version::jdk(17) },
|
||||||
|
{ "BiasedLockingStartupDelay", JDK_Version::jdk(15), JDK_Version::jdk(16), JDK_Version::jdk(17) },
|
||||||
|
{ "PrintBiasedLockingStatistics", JDK_Version::jdk(15), JDK_Version::jdk(16), JDK_Version::jdk(17) },
|
||||||
|
{ "BiasedLockingBulkRebiasThreshold", JDK_Version::jdk(15), JDK_Version::jdk(16), JDK_Version::jdk(17) },
|
||||||
|
{ "BiasedLockingBulkRevokeThreshold", JDK_Version::jdk(15), JDK_Version::jdk(16), JDK_Version::jdk(17) },
|
||||||
|
{ "BiasedLockingDecayTime", JDK_Version::jdk(15), JDK_Version::jdk(16), JDK_Version::jdk(17) },
|
||||||
|
{ "UseOptoBiasInlining", JDK_Version::jdk(15), JDK_Version::jdk(16), JDK_Version::jdk(17) },
|
||||||
|
{ "PrintPreciseBiasedLockingStatistics", JDK_Version::jdk(15), JDK_Version::jdk(16), JDK_Version::jdk(17) },
|
||||||
|
|
||||||
// --- Deprecated alias flags (see also aliased_jvm_flags) - sorted by obsolete_in then expired_in:
|
// --- Deprecated alias flags (see also aliased_jvm_flags) - sorted by obsolete_in then expired_in:
|
||||||
{ "DefaultMaxRAMFraction", JDK_Version::jdk(8), JDK_Version::undefined(), JDK_Version::undefined() },
|
{ "DefaultMaxRAMFraction", JDK_Version::jdk(8), JDK_Version::undefined(), JDK_Version::undefined() },
|
||||||
|
@ -777,32 +777,34 @@ const size_t minimumSymbolTableSize = 1024;
|
|||||||
product(bool, RestrictContended, true, \
|
product(bool, RestrictContended, true, \
|
||||||
"Restrict @Contended to trusted classes") \
|
"Restrict @Contended to trusted classes") \
|
||||||
\
|
\
|
||||||
product(bool, UseBiasedLocking, true, \
|
product(bool, UseBiasedLocking, false, \
|
||||||
"Enable biased locking in JVM") \
|
"(Deprecated) Enable biased locking in JVM") \
|
||||||
\
|
\
|
||||||
product(intx, BiasedLockingStartupDelay, 0, \
|
product(intx, BiasedLockingStartupDelay, 0, \
|
||||||
"Number of milliseconds to wait before enabling biased locking") \
|
"(Deprecated) Number of milliseconds to wait before enabling " \
|
||||||
|
"biased locking") \
|
||||||
range(0, (intx)(max_jint-(max_jint%PeriodicTask::interval_gran))) \
|
range(0, (intx)(max_jint-(max_jint%PeriodicTask::interval_gran))) \
|
||||||
constraint(BiasedLockingStartupDelayFunc,AfterErgo) \
|
constraint(BiasedLockingStartupDelayFunc,AfterErgo) \
|
||||||
\
|
\
|
||||||
diagnostic(bool, PrintBiasedLockingStatistics, false, \
|
diagnostic(bool, PrintBiasedLockingStatistics, false, \
|
||||||
"Print statistics of biased locking in JVM") \
|
"(Deprecated) Print statistics of biased locking in JVM") \
|
||||||
\
|
\
|
||||||
product(intx, BiasedLockingBulkRebiasThreshold, 20, \
|
product(intx, BiasedLockingBulkRebiasThreshold, 20, \
|
||||||
"Threshold of number of revocations per type to try to " \
|
"(Deprecated) Threshold of number of revocations per type to " \
|
||||||
"rebias all objects in the heap of that type") \
|
"try to rebias all objects in the heap of that type") \
|
||||||
range(0, max_intx) \
|
range(0, max_intx) \
|
||||||
constraint(BiasedLockingBulkRebiasThresholdFunc,AfterErgo) \
|
constraint(BiasedLockingBulkRebiasThresholdFunc,AfterErgo) \
|
||||||
\
|
\
|
||||||
product(intx, BiasedLockingBulkRevokeThreshold, 40, \
|
product(intx, BiasedLockingBulkRevokeThreshold, 40, \
|
||||||
"Threshold of number of revocations per type to permanently " \
|
"(Deprecated) Threshold of number of revocations per type to " \
|
||||||
"revoke biases of all objects in the heap of that type") \
|
"permanently revoke biases of all objects in the heap of that " \
|
||||||
|
"type") \
|
||||||
range(0, max_intx) \
|
range(0, max_intx) \
|
||||||
constraint(BiasedLockingBulkRevokeThresholdFunc,AfterErgo) \
|
constraint(BiasedLockingBulkRevokeThresholdFunc,AfterErgo) \
|
||||||
\
|
\
|
||||||
product(intx, BiasedLockingDecayTime, 25000, \
|
product(intx, BiasedLockingDecayTime, 25000, \
|
||||||
"Decay time (in milliseconds) to re-enable bulk rebiasing of a " \
|
"(Deprecated) Decay time (in milliseconds) to re-enable bulk " \
|
||||||
"type after previous bulk rebias") \
|
"rebiasing of a type after previous bulk rebias") \
|
||||||
range(500, max_intx) \
|
range(500, max_intx) \
|
||||||
constraint(BiasedLockingDecayTimeFunc,AfterErgo) \
|
constraint(BiasedLockingDecayTimeFunc,AfterErgo) \
|
||||||
\
|
\
|
||||||
|
@ -85,11 +85,6 @@ TEST_VM(markWord, printing) {
|
|||||||
ThreadInVMfromNative invm(THREAD);
|
ThreadInVMfromNative invm(THREAD);
|
||||||
ResourceMark rm(THREAD);
|
ResourceMark rm(THREAD);
|
||||||
|
|
||||||
if (!UseBiasedLocking || !BiasedLocking::enabled()) {
|
|
||||||
// Can't test this with biased locking disabled.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
oop obj = SystemDictionary::Byte_klass()->allocate_instance(THREAD);
|
oop obj = SystemDictionary::Byte_klass()->allocate_instance(THREAD);
|
||||||
|
|
||||||
FlagSetting fs(WizardMode, true);
|
FlagSetting fs(WizardMode, true);
|
||||||
@ -97,6 +92,8 @@ TEST_VM(markWord, printing) {
|
|||||||
HandleMark hm(THREAD);
|
HandleMark hm(THREAD);
|
||||||
Handle h_obj(THREAD, obj);
|
Handle h_obj(THREAD, obj);
|
||||||
|
|
||||||
|
if (UseBiasedLocking && BiasedLocking::enabled()) {
|
||||||
|
// Can't test this with biased locking disabled.
|
||||||
// Biased locking is initially enabled for this java.lang.Byte object.
|
// Biased locking is initially enabled for this java.lang.Byte object.
|
||||||
assert_test_pattern(h_obj, "is_biased");
|
assert_test_pattern(h_obj, "is_biased");
|
||||||
|
|
||||||
@ -113,6 +110,7 @@ TEST_VM(markWord, printing) {
|
|||||||
#else
|
#else
|
||||||
assert_not_test_pattern(h_obj, "mark(is_biased biased_locker=0x00000000");
|
assert_not_test_pattern(h_obj, "mark(is_biased biased_locker=0x00000000");
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
// Same thread tries to lock it again.
|
// Same thread tries to lock it again.
|
||||||
{
|
{
|
||||||
|
@ -49,6 +49,12 @@ public class VMDeprecatedOptions {
|
|||||||
{"AllowRedefinitionToAddDeleteMethods", "true"},
|
{"AllowRedefinitionToAddDeleteMethods", "true"},
|
||||||
{"PrintVMQWaitTime", "true"},
|
{"PrintVMQWaitTime", "true"},
|
||||||
{"UseNewFieldLayout", "true"},
|
{"UseNewFieldLayout", "true"},
|
||||||
|
{"UseBiasedLocking", "false"},
|
||||||
|
{"BiasedLockingStartupDelay", "0"},
|
||||||
|
{"BiasedLockingBulkRebiasThreshold", "20"},
|
||||||
|
{"BiasedLockingBulkRevokeThreshold", "40"},
|
||||||
|
{"BiasedLockingDecayTime", "25000"},
|
||||||
|
{"UseOptoBiasInlining", "true"},
|
||||||
|
|
||||||
// deprecated alias flags (see also aliased_jvm_flags):
|
// deprecated alias flags (see also aliased_jvm_flags):
|
||||||
{"DefaultMaxRAMFraction", "4"},
|
{"DefaultMaxRAMFraction", "4"},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user