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