Small ObjectMonitor spinning code cleanups

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 23
    • Affects Version/s: None
    • Component/s: hotspot
    • b20

      Add some functions and move down the Knobs for adaptive spinning in order to do more experiments on the heuristics.

      TrySpin should return a boolean.
      TryLock returns either -1, 0, or 1 depending on whether the CAS is attempted or another owner is found. The caller in spinning can use this value to see if a CAS fails, to stop spinning, even in the short spin.

      Some benchmarks like Dacapo pmd show a 22% improvement with just a fixed spin of 2000. pmd waits on the ClassLoader lock, but briefly after the classes are loaded. Rearrange the code to make prototyping easier.

            Assignee:
            Coleen Phillimore
            Reporter:
            Coleen Phillimore
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: