134 ObjectMonitor** freeTailp); |
134 ObjectMonitor** freeTailp); |
135 static bool deflate_monitor(ObjectMonitor* mid, oop obj, |
135 static bool deflate_monitor(ObjectMonitor* mid, oop obj, |
136 ObjectMonitor** freeHeadp, |
136 ObjectMonitor** freeHeadp, |
137 ObjectMonitor** freeTailp); |
137 ObjectMonitor** freeTailp); |
138 static void oops_do(OopClosure* f); |
138 static void oops_do(OopClosure* f); |
|
139 // Process oops in thread local used monitors |
|
140 static void thread_local_used_oops_do(Thread* thread, OopClosure* f); |
139 |
141 |
140 // debugging |
142 // debugging |
141 static void sanity_checks(const bool verbose, |
143 static void sanity_checks(const bool verbose, |
142 const unsigned int cache_line_size, |
144 const unsigned int cache_line_size, |
143 int *error_cnt_ptr, int *warning_cnt_ptr); |
145 int *error_cnt_ptr, int *warning_cnt_ptr); |
154 // global monitor in-use list, for moribund threads, |
156 // global monitor in-use list, for moribund threads, |
155 // monitors they inflated need to be scanned for deflation |
157 // monitors they inflated need to be scanned for deflation |
156 static ObjectMonitor * volatile gOmInUseList; |
158 static ObjectMonitor * volatile gOmInUseList; |
157 // count of entries in gOmInUseList |
159 // count of entries in gOmInUseList |
158 static int gOmInUseCount; |
160 static int gOmInUseCount; |
|
161 |
|
162 // Process oops in all monitors |
|
163 static void global_oops_do(OopClosure* f); |
|
164 // Process oops in all global used monitors (i.e. moribund thread's monitors) |
|
165 static void global_used_oops_do(OopClosure* f); |
|
166 // Process oops in monitors on the given list |
|
167 static void list_oops_do(ObjectMonitor* list, OopClosure* f); |
|
168 |
159 }; |
169 }; |
160 |
170 |
161 // ObjectLocker enforced balanced locking and can never thrown an |
171 // ObjectLocker enforced balanced locking and can never thrown an |
162 // IllegalMonitorStateException. However, a pending exception may |
172 // IllegalMonitorStateException. However, a pending exception may |
163 // have to pass through, and we must also be able to deal with |
173 // have to pass through, and we must also be able to deal with |