< prev index next >

src/share/vm/runtime/synchronizer.hpp

Print this page
rev 13002 : 8180175: ObjectSynchronizer only needs to iterate in-use monitors
Summary: When using -XX:+MonitorInUseLists, then only iterate in-use monitors.
Reviewed-by: zgu,dholmes

*** 134,143 **** --- 134,145 ---- ObjectMonitor** freeTailp); static bool deflate_monitor(ObjectMonitor* mid, oop obj, ObjectMonitor** freeHeadp, ObjectMonitor** freeTailp); static void oops_do(OopClosure* f); + // Process oops in thread local used monitors + static void thread_local_used_oops_do(Thread* thread, OopClosure* f); // debugging static void sanity_checks(const bool verbose, const unsigned int cache_line_size, int *error_cnt_ptr, int *warning_cnt_ptr);
*** 154,163 **** --- 156,173 ---- // global monitor in-use list, for moribund threads, // monitors they inflated need to be scanned for deflation static ObjectMonitor * volatile gOmInUseList; // count of entries in gOmInUseList static int gOmInUseCount; + + // Process oops in all monitors + static void global_oops_do(OopClosure* f); + // Process oops in all global used monitors (i.e. moribund thread's monitors) + static void global_used_oops_do(OopClosure* f); + // Process oops in monitors on the given list + static void list_oops_do(ObjectMonitor* list, OopClosure* f); + }; // ObjectLocker enforced balanced locking and can never thrown an // IllegalMonitorStateException. However, a pending exception may // have to pass through, and we must also be able to deal with
< prev index next >