8315869: UseHeavyMonitors not used

Reviewed-by: phh
Backport-of: 3301fb1e8a
This commit is contained in:
Aleksey Shipilev
2023-10-24 15:36:25 +00:00
committed by Vitaly Provodin
parent d79b950b37
commit d42ceb6d14
4 changed files with 3 additions and 16 deletions

View File

@@ -1949,15 +1949,6 @@ bool Arguments::check_vm_args_consistency() {
}
#endif
if (UseHeavyMonitors) {
if (FLAG_IS_CMDLINE(LockingMode) && LockingMode != LM_MONITOR) {
jio_fprintf(defaultStream::error_stream(),
"Conflicting -XX:+UseHeavyMonitors and -XX:LockingMode=%d flags", LockingMode);
return false;
}
FLAG_SET_CMDLINE(LockingMode, LM_MONITOR);
}
#if !defined(X86) && !defined(AARCH64) && !defined(PPC64) && !defined(RISCV64) && !defined(S390)
if (LockingMode == LM_MONITOR) {
jio_fprintf(defaultStream::error_stream(),

View File

@@ -1050,13 +1050,9 @@ const int ObjectAlignmentInBytes = 8;
product(bool, ErrorFileToStdout, false, \
"If true, error data is printed to stdout instead of a file") \
\
develop(bool, UseHeavyMonitors, false, \
"(Deprecated) Use heavyweight instead of lightweight Java " \
"monitors") \
\
develop(bool, VerifyHeavyMonitors, false, \
"Checks that no stack locking happens when using " \
"+UseHeavyMonitors") \
"-XX:LockingMode=0 (LM_MONITOR)") \
\
product(bool, PrintStringTableStatistics, false, \
"print statistics about the StringTable and SymbolTable") \

View File

@@ -34,7 +34,7 @@
* @test
* @requires vm.continuations & vm.debug
* @modules java.base/java.lang:+open
* @run junit/othervm -XX:+UseHeavyMonitors CarrierThreadWaits
* @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:LockingMode=0 CarrierThreadWaits
*/
import java.lang.management.LockInfo;

View File

@@ -51,7 +51,7 @@
* @requires os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64" | os.arch=="aarch64" | os.arch == "ppc64" | os.arch == "ppc64le" | os.arch == "riscv64" | os.arch == "s390x"
* @requires vm.debug
* @library /test/lib
* @run main/othervm/timeout=1600 -XX:+UseHeavyMonitors -XX:+VerifyHeavyMonitors MapLoops
* @run main/othervm/timeout=1600 -XX:+UnlockExperimentalVMOptions -XX:LockingMode=0 -XX:+VerifyHeavyMonitors MapLoops
*/
import static java.util.concurrent.TimeUnit.MILLISECONDS;