Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/mutexLocker.cpp @ 12106:739c309fd729
8023457: Event based tracing framework needs a mutex for thread groups
Reviewed-by: acorn, sla
author | mgronlun |
---|---|
date | Fri, 23 Aug 2013 10:36:34 +0200 |
parents | f2110083203d |
children | b2e698d2276c |
comparison
equal
deleted
inserted
replaced
12105:817e46dd5864 | 12106:739c309fd729 |
---|---|
122 | 122 |
123 Monitor* GCTaskManager_lock = NULL; | 123 Monitor* GCTaskManager_lock = NULL; |
124 | 124 |
125 Mutex* Management_lock = NULL; | 125 Mutex* Management_lock = NULL; |
126 Monitor* Service_lock = NULL; | 126 Monitor* Service_lock = NULL; |
127 Mutex* Stacktrace_lock = NULL; | 127 Monitor* PeriodicTask_lock = NULL; |
128 | 128 |
129 Monitor* JfrQuery_lock = NULL; | 129 #ifdef INCLUDE_TRACE |
130 Mutex* JfrStacktrace_lock = NULL; | |
130 Monitor* JfrMsg_lock = NULL; | 131 Monitor* JfrMsg_lock = NULL; |
131 Mutex* JfrBuffer_lock = NULL; | 132 Mutex* JfrBuffer_lock = NULL; |
132 Mutex* JfrStream_lock = NULL; | 133 Mutex* JfrStream_lock = NULL; |
133 Monitor* PeriodicTask_lock = NULL; | 134 Mutex* JfrThreadGroups_lock = NULL; |
135 #endif | |
134 | 136 |
135 #define MAX_NUM_MUTEX 128 | 137 #define MAX_NUM_MUTEX 128 |
136 static Monitor * _mutex_array[MAX_NUM_MUTEX]; | 138 static Monitor * _mutex_array[MAX_NUM_MUTEX]; |
137 static int _num_mutex; | 139 static int _num_mutex; |
138 | 140 |
204 def(OopMapCacheAlloc_lock , Mutex, leaf, true ); // used for oop_map_cache allocation. | 206 def(OopMapCacheAlloc_lock , Mutex, leaf, true ); // used for oop_map_cache allocation. |
205 | 207 |
206 def(Patching_lock , Mutex , special, true ); // used for safepointing and code patching. | 208 def(Patching_lock , Mutex , special, true ); // used for safepointing and code patching. |
207 def(ObjAllocPost_lock , Monitor, special, false); | 209 def(ObjAllocPost_lock , Monitor, special, false); |
208 def(Service_lock , Monitor, special, true ); // used for service thread operations | 210 def(Service_lock , Monitor, special, true ); // used for service thread operations |
209 def(Stacktrace_lock , Mutex, special, true ); // used for JFR stacktrace database | |
210 def(JmethodIdCreation_lock , Mutex , leaf, true ); // used for creating jmethodIDs. | 211 def(JmethodIdCreation_lock , Mutex , leaf, true ); // used for creating jmethodIDs. |
211 | 212 |
212 def(SystemDictionary_lock , Monitor, leaf, true ); // lookups done by VM thread | 213 def(SystemDictionary_lock , Monitor, leaf, true ); // lookups done by VM thread |
213 def(PackageTable_lock , Mutex , leaf, false); | 214 def(PackageTable_lock , Mutex , leaf, false); |
214 def(InlineCacheBuffer_lock , Mutex , leaf, true ); | 215 def(InlineCacheBuffer_lock , Mutex , leaf, true ); |
270 def(MethodCompileQueue_lock , Monitor, nonleaf+4, true ); | 271 def(MethodCompileQueue_lock , Monitor, nonleaf+4, true ); |
271 def(Debug2_lock , Mutex , nonleaf+4, true ); | 272 def(Debug2_lock , Mutex , nonleaf+4, true ); |
272 def(Debug3_lock , Mutex , nonleaf+4, true ); | 273 def(Debug3_lock , Mutex , nonleaf+4, true ); |
273 def(ProfileVM_lock , Monitor, special, false); // used for profiling of the VMThread | 274 def(ProfileVM_lock , Monitor, special, false); // used for profiling of the VMThread |
274 def(CompileThread_lock , Monitor, nonleaf+5, false ); | 275 def(CompileThread_lock , Monitor, nonleaf+5, false ); |
275 | 276 def(PeriodicTask_lock , Monitor, nonleaf+5, true); |
277 | |
278 #ifdef INCLUDE_TRACE | |
276 def(JfrMsg_lock , Monitor, leaf, true); | 279 def(JfrMsg_lock , Monitor, leaf, true); |
277 def(JfrBuffer_lock , Mutex, nonleaf+1, true); | 280 def(JfrBuffer_lock , Mutex, nonleaf+1, true); |
281 def(JfrThreadGroups_lock , Mutex, nonleaf+1, true); | |
278 def(JfrStream_lock , Mutex, nonleaf+2, true); | 282 def(JfrStream_lock , Mutex, nonleaf+2, true); |
279 def(PeriodicTask_lock , Monitor, nonleaf+5, true); | 283 def(JfrStacktrace_lock , Mutex, special, true ); |
284 #endif | |
285 | |
280 } | 286 } |
281 | 287 |
282 GCMutexLocker::GCMutexLocker(Monitor * mutex) { | 288 GCMutexLocker::GCMutexLocker(Monitor * mutex) { |
283 if (SafepointSynchronize::is_at_safepoint()) { | 289 if (SafepointSynchronize::is_at_safepoint()) { |
284 _locked = false; | 290 _locked = false; |