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).
- relates to
-
JDK-8180599 Possibly miss to iterate monitors on thread exit
-
- Resolved
-
-
JDK-8153224 Monitor deflation prolong safepoints
-
- Resolved
-