ObjectSynchronizer only needs to iterate in-use monitors

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P3
    • 10
    • Affects Version/s: 9, 10
    • Component/s: hotspot
    • None
    • b21
    • generic
    • generic

      ObjectSynchronizer::oops_do() currently iterates all monitor blocks, even free ones. With -XX:+MonitorInUseLists, each thread has its own in-use monitors list, and ObjectSynchronizer has a global gOmInUseList for moribund threads. Iterating over in-use monitors only significantly inmproves scanning time for monitors, because it avoids scanning free blocks, improves caching (no padding, and better chances to have thread-local oops in cache already).

            Assignee:
            Roman Kennke
            Reporter:
            Roman Kennke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: