195 static void inc_in_use_list_ceiling();
196 static void set_in_use_list_ceiling(size_t new_value);
197 static bool is_async_deflation_needed();
198 static bool is_async_deflation_requested() { return _is_async_deflation_requested; }
199 static bool is_final_audit() { return _is_final_audit; }
200 static void set_is_final_audit() { _is_final_audit = true; }
201 static jlong last_async_deflation_time_ns() { return _last_async_deflation_time_ns; }
202 static void request_deflate_idle_monitors();
203 static bool request_deflate_idle_monitors_from_wb(); // for whitebox test support
204 static void set_is_async_deflation_requested(bool new_value) { _is_async_deflation_requested = new_value; }
205 static jlong time_since_last_async_deflation_ms();
206
207 // debugging
208 static void audit_and_print_stats(outputStream* out, bool on_exit);
209 static void chk_in_use_list(outputStream* out, int* error_cnt_p);
210 static void chk_in_use_entry(ObjectMonitor* n, outputStream* out,
211 int* error_cnt_p);
212 static void do_final_audit_and_print_stats();
213 static void log_in_use_monitor_details(outputStream* out, bool log_all);
214
215 private:
216 friend class SynchronizerTest;
217 friend class LightweightSynchronizer;
218
219 static MonitorList _in_use_list;
220 static volatile bool _is_async_deflation_requested;
221 static volatile bool _is_final_audit;
222 static jlong _last_async_deflation_time_ns;
223
224 // Support for SynchronizerTest access to GVars fields:
225 static u_char* get_gvars_addr();
226 static u_char* get_gvars_hc_sequence_addr();
227 static size_t get_gvars_size();
228 static u_char* get_gvars_stw_random_addr();
229
230 static void handle_sync_on_value_based_class(Handle obj, JavaThread* locking_thread);
231 };
232
233 // ObjectLocker enforces balanced locking and can never throw an
234 // IllegalMonitorStateException. However, a pending exception may
|
195 static void inc_in_use_list_ceiling();
196 static void set_in_use_list_ceiling(size_t new_value);
197 static bool is_async_deflation_needed();
198 static bool is_async_deflation_requested() { return _is_async_deflation_requested; }
199 static bool is_final_audit() { return _is_final_audit; }
200 static void set_is_final_audit() { _is_final_audit = true; }
201 static jlong last_async_deflation_time_ns() { return _last_async_deflation_time_ns; }
202 static void request_deflate_idle_monitors();
203 static bool request_deflate_idle_monitors_from_wb(); // for whitebox test support
204 static void set_is_async_deflation_requested(bool new_value) { _is_async_deflation_requested = new_value; }
205 static jlong time_since_last_async_deflation_ms();
206
207 // debugging
208 static void audit_and_print_stats(outputStream* out, bool on_exit);
209 static void chk_in_use_list(outputStream* out, int* error_cnt_p);
210 static void chk_in_use_entry(ObjectMonitor* n, outputStream* out,
211 int* error_cnt_p);
212 static void do_final_audit_and_print_stats();
213 static void log_in_use_monitor_details(outputStream* out, bool log_all);
214
215 static intptr_t get_next_hash(Thread* current, oop obj);
216
217 private:
218 friend class SynchronizerTest;
219 friend class LightweightSynchronizer;
220
221 static MonitorList _in_use_list;
222 static volatile bool _is_async_deflation_requested;
223 static volatile bool _is_final_audit;
224 static jlong _last_async_deflation_time_ns;
225
226 // Support for SynchronizerTest access to GVars fields:
227 static u_char* get_gvars_addr();
228 static u_char* get_gvars_hc_sequence_addr();
229 static size_t get_gvars_size();
230 static u_char* get_gvars_stw_random_addr();
231
232 static void handle_sync_on_value_based_class(Handle obj, JavaThread* locking_thread);
233 };
234
235 // ObjectLocker enforces balanced locking and can never throw an
236 // IllegalMonitorStateException. However, a pending exception may
|