-
Enhancement
-
Resolution: Fixed
-
P4
-
21, 22
-
b16
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8318731 | 21.0.2 | Aleksey Shipilev | P4 | Resolved | Fixed | b05 |
The develop option UseHeavyMonitors is only used to set LockingMode=LM_MONITOR. It should probably be removed to avoid inconsistent use.
share/runtime/arguments.cpp: if (UseHeavyMonitors) {
share/runtime/arguments.cpp: "Conflicting -XX:+UseHeavyMonitors and -XX:LockingMode=%d flags\n", LockingMode);
share/runtime/globals.hpp: develop(bool, UseHeavyMonitors, false, \
share/runtime/globals.hpp: "+UseHeavyMonitors") \
if (UseHeavyMonitors) {
if (FLAG_IS_CMDLINE(LockingMode) && LockingMode != LM_MONITOR) {
jio_fprintf(defaultStream::error_stream(),
"Conflicting -XX:+UseHeavyMonitors and -XX:LockingMode=%d flags\n", LockingMode);
return false;
}
FLAG_SET_CMDLINE(LockingMode, LM_MONITOR);
}
It's not found in any of the hotspot tests. But there are two instances in the jdk tests:
grep -r UseHeavyMonitors
jdk/java/lang/Thread/virtual/CarrierThreadWaits.java: * @run junit/othervm -XX:+UseHeavyMonitors CarrierThreadWaits
jdk/java/util/concurrent/ConcurrentHashMap/MapLoops.java: * @run main/othervm/timeout=1600 -XX:+UseHeavyMonitors -XX:+VerifyHeavyMonitors MapLoops
share/runtime/arguments.cpp: if (UseHeavyMonitors) {
share/runtime/arguments.cpp: "Conflicting -XX:+UseHeavyMonitors and -XX:LockingMode=%d flags\n", LockingMode);
share/runtime/globals.hpp: develop(bool, UseHeavyMonitors, false, \
share/runtime/globals.hpp: "+UseHeavyMonitors") \
if (UseHeavyMonitors) {
if (FLAG_IS_CMDLINE(LockingMode) && LockingMode != LM_MONITOR) {
jio_fprintf(defaultStream::error_stream(),
"Conflicting -XX:+UseHeavyMonitors and -XX:LockingMode=%d flags\n", LockingMode);
return false;
}
FLAG_SET_CMDLINE(LockingMode, LM_MONITOR);
}
It's not found in any of the hotspot tests. But there are two instances in the jdk tests:
grep -r UseHeavyMonitors
jdk/java/lang/Thread/virtual/CarrierThreadWaits.java: * @run junit/othervm -XX:+UseHeavyMonitors CarrierThreadWaits
jdk/java/util/concurrent/ConcurrentHashMap/MapLoops.java: * @run main/othervm/timeout=1600 -XX:+UseHeavyMonitors -XX:+VerifyHeavyMonitors MapLoops
- backported by
-
JDK-8318731 UseHeavyMonitors not used
- Resolved