8210155: Lock ClassLoaderDataGraph

In preparation for concurrent class unloading.

Reviewed-by: hseigel, eosterlund
This commit is contained in:
Coleen Phillimore 2018-08-31 07:03:46 -04:00
parent 71479d029a
commit eb9259138f
19 changed files with 199 additions and 82 deletions

View file

@ -147,6 +147,7 @@ Mutex* UnsafeJlong_lock = NULL;
Monitor* CodeHeapStateAnalytics_lock = NULL;
Mutex* MetaspaceExpand_lock = NULL;
Mutex* ClassLoaderDataGraph_lock = NULL;
#define MAX_NUM_MUTEX 128
static Monitor * _mutex_array[MAX_NUM_MUTEX];
@ -224,6 +225,7 @@ void mutex_init() {
def(OopMapCacheAlloc_lock , PaddedMutex , leaf, true, Monitor::_safepoint_check_always); // used for oop_map_cache allocation.
def(MetaspaceExpand_lock , PaddedMutex , leaf-1, true, Monitor::_safepoint_check_never);
def(ClassLoaderDataGraph_lock , PaddedMutex , nonleaf, true, Monitor::_safepoint_check_always);
def(Patching_lock , PaddedMutex , special, true, Monitor::_safepoint_check_never); // used for safepointing and code patching.
def(Service_lock , PaddedMonitor, special, true, Monitor::_safepoint_check_never); // used for service thread operations