JDK-8180175 : ObjectSynchronizer only needs to iterate in-use monitors
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9,10
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2017-05-11
  • Updated: 2019-05-22
  • Resolved: 2017-05-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10
10 b21Fixed
Related Reports
Relates :  
Relates :  
Description
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).