Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8315869

UseHeavyMonitors not used

    XMLWordPrintable

Details

    • b16

    Backports

      Description

        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

        Attachments

          Issue Links

            Activity

              People

                coleenp Coleen Phillimore
                coleenp Coleen Phillimore
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: