Skip to content

Commit 3301fb1

Browse files
committed
8315869: UseHeavyMonitors not used
Reviewed-by: dcubed, alanb
1 parent 54028e7 commit 3301fb1

File tree

4 files changed

+3
-16
lines changed

4 files changed

+3
-16
lines changed

src/hotspot/share/runtime/arguments.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1911,15 +1911,6 @@ bool Arguments::check_vm_args_consistency() {
19111911
}
19121912
#endif
19131913

1914-
if (UseHeavyMonitors) {
1915-
if (FLAG_IS_CMDLINE(LockingMode) && LockingMode != LM_MONITOR) {
1916-
jio_fprintf(defaultStream::error_stream(),
1917-
"Conflicting -XX:+UseHeavyMonitors and -XX:LockingMode=%d flags\n", LockingMode);
1918-
return false;
1919-
}
1920-
FLAG_SET_CMDLINE(LockingMode, LM_MONITOR);
1921-
}
1922-
19231914
#if !defined(X86) && !defined(AARCH64) && !defined(PPC64) && !defined(RISCV64) && !defined(S390)
19241915
if (LockingMode == LM_MONITOR) {
19251916
jio_fprintf(defaultStream::error_stream(),

src/hotspot/share/runtime/globals.hpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,13 +1059,9 @@ const int ObjectAlignmentInBytes = 8;
10591059
product(bool, ErrorFileToStdout, false, \
10601060
"If true, error data is printed to stdout instead of a file") \
10611061
\
1062-
develop(bool, UseHeavyMonitors, false, \
1063-
"(Deprecated) Use heavyweight instead of lightweight Java " \
1064-
"monitors") \
1065-
\
10661062
develop(bool, VerifyHeavyMonitors, false, \
10671063
"Checks that no stack locking happens when using " \
1068-
"+UseHeavyMonitors") \
1064+
"-XX:LockingMode=0 (LM_MONITOR)") \
10691065
\
10701066
product(bool, PrintStringTableStatistics, false, \
10711067
"print statistics about the StringTable and SymbolTable") \

test/jdk/java/lang/Thread/virtual/CarrierThreadWaits.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
* @test
3535
* @requires vm.continuations & vm.debug
3636
* @modules java.base/java.lang:+open
37-
* @run junit/othervm -XX:+UseHeavyMonitors CarrierThreadWaits
37+
* @run junit/othervm -XX:LockingMode=0 CarrierThreadWaits
3838
*/
3939

4040
import java.lang.management.LockInfo;

test/jdk/java/util/concurrent/ConcurrentHashMap/MapLoops.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
* @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"
5252
* @requires vm.debug
5353
* @library /test/lib
54-
* @run main/othervm/timeout=1600 -XX:+UseHeavyMonitors -XX:+VerifyHeavyMonitors MapLoops
54+
* @run main/othervm/timeout=1600 -XX:LockingMode=0 -XX:+VerifyHeavyMonitors MapLoops
5555
*/
5656

5757
import static java.util.concurrent.TimeUnit.MILLISECONDS;

0 commit comments

Comments
 (0)