71 Monitor* Threads_lock = NULL;
72 Monitor* CGC_lock = NULL;
73 Monitor* STS_lock = NULL;
74 Monitor* SLT_lock = NULL;
75 Monitor* iCMS_lock = NULL;
76 Monitor* FullGCCount_lock = NULL;
77 Monitor* CMark_lock = NULL;
78 Mutex* CMRegionStack_lock = NULL;
79 Mutex* SATB_Q_FL_lock = NULL;
80 Monitor* SATB_Q_CBL_mon = NULL;
81 Mutex* Shared_SATB_Q_lock = NULL;
82 Mutex* DirtyCardQ_FL_lock = NULL;
83 Monitor* DirtyCardQ_CBL_mon = NULL;
84 Mutex* Shared_DirtyCardQ_lock = NULL;
85 Mutex* ParGCRareEvent_lock = NULL;
86 Mutex* EvacFailureStack_lock = NULL;
87 Mutex* DerivedPointerTableGC_lock = NULL;
88 Mutex* Compile_lock = NULL;
89 Monitor* MethodCompileQueue_lock = NULL;
90 Monitor* CompileThread_lock = NULL;
91 Mutex* CompileTaskAlloc_lock = NULL;
92 Mutex* CompileStatistics_lock = NULL;
93 Mutex* MultiArray_lock = NULL;
94 Monitor* Terminator_lock = NULL;
95 Monitor* BeforeExit_lock = NULL;
96 Monitor* Notify_lock = NULL;
97 Monitor* Interrupt_lock = NULL;
98 Monitor* ProfileVM_lock = NULL;
99 Mutex* ProfilePrint_lock = NULL;
100 Mutex* ExceptionCache_lock = NULL;
101 Monitor* ObjAllocPost_lock = NULL;
102 Mutex* OsrList_lock = NULL;
103 #ifndef PRODUCT
104 Mutex* FullGCALot_lock = NULL;
105 #endif
106
107 Mutex* Debug1_lock = NULL;
108 Mutex* Debug2_lock = NULL;
109 Mutex* Debug3_lock = NULL;
110
261 def(MemberNameTable_lock , Mutex , nonleaf+1, false); // Used to protect MemberNameTable
262
263 def(CompiledIC_lock , Mutex , nonleaf+2, false); // locks VtableStubs_lock, InlineCacheBuffer_lock
264 def(CompileTaskAlloc_lock , Mutex , nonleaf+2, true );
265 def(CompileStatistics_lock , Mutex , nonleaf+2, false);
266 def(MultiArray_lock , Mutex , nonleaf+2, false); // locks SymbolTable_lock
267
268 def(JvmtiThreadState_lock , Mutex , nonleaf+2, false); // Used by JvmtiThreadState/JvmtiEventController
269 def(JvmtiPendingEvent_lock , Monitor, nonleaf, false); // Used by JvmtiCodeBlobEvents
270 def(Management_lock , Mutex , nonleaf+2, false); // used for JVM management
271
272 def(Compile_lock , Mutex , nonleaf+3, true );
273 def(MethodData_lock , Mutex , nonleaf+3, false);
274
275 def(MethodCompileQueue_lock , Monitor, nonleaf+4, true );
276 def(Debug2_lock , Mutex , nonleaf+4, true );
277 def(Debug3_lock , Mutex , nonleaf+4, true );
278 def(ProfileVM_lock , Monitor, special, false); // used for profiling of the VMThread
279 def(CompileThread_lock , Monitor, nonleaf+5, false );
280 def(PeriodicTask_lock , Monitor, nonleaf+5, true);
281
282 #ifdef INCLUDE_TRACE
283 def(JfrMsg_lock , Monitor, leaf, true);
284 def(JfrBuffer_lock , Mutex, leaf, true);
285 def(JfrThreadGroups_lock , Mutex, leaf, true);
286 def(JfrStream_lock , Mutex, nonleaf, true);
287 def(JfrStacktrace_lock , Mutex, special, true);
288 #endif
289
290 }
291
292 GCMutexLocker::GCMutexLocker(Monitor * mutex) {
293 if (SafepointSynchronize::is_at_safepoint()) {
294 _locked = false;
295 } else {
296 _mutex = mutex;
297 _locked = true;
298 _mutex->lock();
299 }
300 }
301
|
71 Monitor* Threads_lock = NULL;
72 Monitor* CGC_lock = NULL;
73 Monitor* STS_lock = NULL;
74 Monitor* SLT_lock = NULL;
75 Monitor* iCMS_lock = NULL;
76 Monitor* FullGCCount_lock = NULL;
77 Monitor* CMark_lock = NULL;
78 Mutex* CMRegionStack_lock = NULL;
79 Mutex* SATB_Q_FL_lock = NULL;
80 Monitor* SATB_Q_CBL_mon = NULL;
81 Mutex* Shared_SATB_Q_lock = NULL;
82 Mutex* DirtyCardQ_FL_lock = NULL;
83 Monitor* DirtyCardQ_CBL_mon = NULL;
84 Mutex* Shared_DirtyCardQ_lock = NULL;
85 Mutex* ParGCRareEvent_lock = NULL;
86 Mutex* EvacFailureStack_lock = NULL;
87 Mutex* DerivedPointerTableGC_lock = NULL;
88 Mutex* Compile_lock = NULL;
89 Monitor* MethodCompileQueue_lock = NULL;
90 Monitor* CompileThread_lock = NULL;
91 Monitor* Compilation_lock = NULL;
92 Mutex* CompileTaskAlloc_lock = NULL;
93 Mutex* CompileStatistics_lock = NULL;
94 Mutex* MultiArray_lock = NULL;
95 Monitor* Terminator_lock = NULL;
96 Monitor* BeforeExit_lock = NULL;
97 Monitor* Notify_lock = NULL;
98 Monitor* Interrupt_lock = NULL;
99 Monitor* ProfileVM_lock = NULL;
100 Mutex* ProfilePrint_lock = NULL;
101 Mutex* ExceptionCache_lock = NULL;
102 Monitor* ObjAllocPost_lock = NULL;
103 Mutex* OsrList_lock = NULL;
104 #ifndef PRODUCT
105 Mutex* FullGCALot_lock = NULL;
106 #endif
107
108 Mutex* Debug1_lock = NULL;
109 Mutex* Debug2_lock = NULL;
110 Mutex* Debug3_lock = NULL;
111
262 def(MemberNameTable_lock , Mutex , nonleaf+1, false); // Used to protect MemberNameTable
263
264 def(CompiledIC_lock , Mutex , nonleaf+2, false); // locks VtableStubs_lock, InlineCacheBuffer_lock
265 def(CompileTaskAlloc_lock , Mutex , nonleaf+2, true );
266 def(CompileStatistics_lock , Mutex , nonleaf+2, false);
267 def(MultiArray_lock , Mutex , nonleaf+2, false); // locks SymbolTable_lock
268
269 def(JvmtiThreadState_lock , Mutex , nonleaf+2, false); // Used by JvmtiThreadState/JvmtiEventController
270 def(JvmtiPendingEvent_lock , Monitor, nonleaf, false); // Used by JvmtiCodeBlobEvents
271 def(Management_lock , Mutex , nonleaf+2, false); // used for JVM management
272
273 def(Compile_lock , Mutex , nonleaf+3, true );
274 def(MethodData_lock , Mutex , nonleaf+3, false);
275
276 def(MethodCompileQueue_lock , Monitor, nonleaf+4, true );
277 def(Debug2_lock , Mutex , nonleaf+4, true );
278 def(Debug3_lock , Mutex , nonleaf+4, true );
279 def(ProfileVM_lock , Monitor, special, false); // used for profiling of the VMThread
280 def(CompileThread_lock , Monitor, nonleaf+5, false );
281 def(PeriodicTask_lock , Monitor, nonleaf+5, true);
282 if (WhiteBoxAPI) {
283 def(Compilation_lock , Monitor, leaf, false );
284 }
285 #ifdef INCLUDE_TRACE
286 def(JfrMsg_lock , Monitor, leaf, true);
287 def(JfrBuffer_lock , Mutex, leaf, true);
288 def(JfrThreadGroups_lock , Mutex, leaf, true);
289 def(JfrStream_lock , Mutex, nonleaf, true);
290 def(JfrStacktrace_lock , Mutex, special, true);
291 #endif
292
293 }
294
295 GCMutexLocker::GCMutexLocker(Monitor * mutex) {
296 if (SafepointSynchronize::is_at_safepoint()) {
297 _locked = false;
298 } else {
299 _mutex = mutex;
300 _locked = true;
301 _mutex->lock();
302 }
303 }
304
|