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

ObjectMonitor NotRunnable is not really an optimization

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 23
    • 21, 22, 23
    • hotspot
    • b05

      This function and the comment block that precedes it are an attempt to avoid spinning if the object that owns the lock is off proc, but it can't really tell that from the things it's testing. According to [~dice] the original intent was that Solaris would provide a secret API to tell that.
      Instead it's a function that increases the complexity of the spinning algorithm.

      We should run some benchmarks to determine if this function does anything and remove it if not.

      This function doesn't work if we use the ThreadID as owner for the ObjectMonitor which helps Loom. See JDK-8320320.

            fbredberg Fredrik Bredberg
            coleenp Coleen Phillimore
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: