155 #endif |
155 #endif |
156 #if INCLUDE_CDS && INCLUDE_JVMTI |
156 #if INCLUDE_CDS && INCLUDE_JVMTI |
157 Mutex* CDSClassFileStream_lock = NULL; |
157 Mutex* CDSClassFileStream_lock = NULL; |
158 #endif |
158 #endif |
159 |
159 |
|
160 #if INCLUDE_JVMCI |
|
161 Monitor* JVMCI_lock = NULL; |
|
162 Mutex* JVMCIGlobalAlloc_lock = NULL; |
|
163 Mutex* JVMCIGlobalActive_lock = NULL; |
|
164 #endif |
|
165 |
|
166 |
160 #define MAX_NUM_MUTEX 128 |
167 #define MAX_NUM_MUTEX 128 |
161 static Monitor * _mutex_array[MAX_NUM_MUTEX]; |
168 static Monitor * _mutex_array[MAX_NUM_MUTEX]; |
162 static int _num_mutex; |
169 static int _num_mutex; |
163 |
170 |
164 #ifdef ASSERT |
171 #ifdef ASSERT |
346 def(NMTQuery_lock , PaddedMutex , max_nonleaf, false, Monitor::_safepoint_check_always); |
353 def(NMTQuery_lock , PaddedMutex , max_nonleaf, false, Monitor::_safepoint_check_always); |
347 #endif |
354 #endif |
348 #if INCLUDE_CDS && INCLUDE_JVMTI |
355 #if INCLUDE_CDS && INCLUDE_JVMTI |
349 def(CDSClassFileStream_lock , PaddedMutex , max_nonleaf, false, Monitor::_safepoint_check_always); |
356 def(CDSClassFileStream_lock , PaddedMutex , max_nonleaf, false, Monitor::_safepoint_check_always); |
350 #endif |
357 #endif |
|
358 |
|
359 #if INCLUDE_JVMCI |
|
360 def(JVMCI_lock , PaddedMonitor, nonleaf+2, true, Monitor::_safepoint_check_always); |
|
361 def(JVMCIGlobalAlloc_lock , PaddedMutex , nonleaf, true, Monitor::_safepoint_check_never); |
|
362 def(JVMCIGlobalActive_lock , PaddedMutex , nonleaf-1, true, Monitor::_safepoint_check_never); |
|
363 #endif |
351 } |
364 } |
352 |
365 |
353 GCMutexLocker::GCMutexLocker(Monitor * mutex) { |
366 GCMutexLocker::GCMutexLocker(Monitor * mutex) { |
354 if (SafepointSynchronize::is_at_safepoint()) { |
367 if (SafepointSynchronize::is_at_safepoint()) { |
355 _locked = false; |
368 _locked = false; |