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

Change LockingMode default from LM_LEGACY to LM_LIGHTWEIGHT

XMLWordPrintable

    • behavioral
    • low
    • There is a low risk of performance differences between the LM_LEGACY mode and the LM_LIGHTWEIGHT mode especially if applications hit "boundary conditions" for LM_LIGHTWEIGHT mode. Functionally these modes should be 100% equivalent.
    • add/remove/modify command line option
    • Implementation

      Summary

      Change "LockingMode" default value from LM_LEGACY to LM_LIGHTWEIGHT.

      Problem

      The enhancement JDK-8291555 has introduced the experimental option "LockingMode" which improves performance in some scenarios. The enhancement JDK-8315061 changed LockingMode into a product flag. Now it is time to change the default from LM_LEGACY to LM_LIGHTWEIGHT in order to make the benefits available by default.

      Solution

      Change the default flag from LM_LEGACY to LM_LIGHTWEIGHT.

      Specification

      -    product(int, LockingMode, LM_LEGACY,                                       \
      +    product(int, LockingMode, LM_LIGHTWEIGHT,                                  \
                    "Select locking mode: "                                           \
                    "0: monitors only (LM_MONITOR), "                                 \
                    "1: monitors & legacy stack-locking (LM_LEGACY, default), "       \
                    "2: monitors & new lightweight locking (LM_LIGHTWEIGHT)")         \
                    range(0, 2)                                                       \

            dcubed Daniel Daugherty
            dcubed Daniel Daugherty
            David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: