8235795: replace monitor list mux{Acquire,Release}(&gListLock) with spin locks

Reviewed-by: dholmes, coleenp, rehn
This commit is contained in:
Daniel D. Daugherty 2020-02-05 11:40:20 -05:00
parent 8ff24c55ef
commit a7a82b0c79
6 changed files with 749 additions and 310 deletions

View file

@ -138,6 +138,7 @@ class ObjectSynchronizer : AllStatic {
// For a given monitor list: global or per-thread, deflate idle monitors
static int deflate_monitor_list(ObjectMonitor** list_p,
int* count_p,
ObjectMonitor** free_head_p,
ObjectMonitor** free_tail_p);
static bool deflate_monitor(ObjectMonitor* mid, oop obj,
@ -165,7 +166,7 @@ class ObjectSynchronizer : AllStatic {
static void chk_per_thread_free_list_and_count(JavaThread *jt,
outputStream * out,
int *error_cnt_p);
static void log_in_use_monitor_details(outputStream * out, bool on_exit);
static void log_in_use_monitor_details(outputStream * out);
static int log_monitor_list_counts(outputStream * out);
static int verify_objmon_isinpool(ObjectMonitor *addr) PRODUCT_RETURN0;
@ -174,14 +175,10 @@ class ObjectSynchronizer : AllStatic {
enum { _BLOCKSIZE = 128 };
// global list of blocks of monitors
static PaddedObjectMonitor* volatile g_block_list;
// global monitor free list
static ObjectMonitor* volatile g_free_list;
// global monitor in-use list, for moribund threads,
// monitors they inflated need to be scanned for deflation
static ObjectMonitor* volatile g_om_in_use_list;
// count of entries in g_om_in_use_list
static int g_om_in_use_count;
static PaddedObjectMonitor* g_block_list;
// Function to prepend new blocks to the appropriate lists:
static void prepend_block_to_lists(PaddedObjectMonitor* new_blk);
// Process oops in all global used monitors (i.e. moribund thread's monitors)
static void global_used_oops_do(OopClosure* f);