Mercurial > hg > truffle
comparison src/share/vm/runtime/mutexLocker.cpp @ 15582:063ec2920d21
made Graal runtime initialization in hosted mode lazy
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 09 May 2014 18:46:41 +0200 |
parents | 4062efea018b |
children | 4e12cac4e51e |
comparison
equal
deleted
inserted
replaced
15581:0dc0926cf0d8 | 15582:063ec2920d21 |
---|---|
131 Mutex* JfrBuffer_lock = NULL; | 131 Mutex* JfrBuffer_lock = NULL; |
132 Mutex* JfrStream_lock = NULL; | 132 Mutex* JfrStream_lock = NULL; |
133 Mutex* JfrThreadGroups_lock = NULL; | 133 Mutex* JfrThreadGroups_lock = NULL; |
134 #endif | 134 #endif |
135 | 135 |
136 #ifdef GRAAL | |
137 Monitor* GraalInitialization_lock = NULL; | |
138 #endif | |
139 | |
136 #define MAX_NUM_MUTEX 128 | 140 #define MAX_NUM_MUTEX 128 |
137 static Monitor * _mutex_array[MAX_NUM_MUTEX]; | 141 static Monitor * _mutex_array[MAX_NUM_MUTEX]; |
138 static int _num_mutex; | 142 static int _num_mutex; |
139 | 143 |
140 #ifdef ASSERT | 144 #ifdef ASSERT |
279 def(JfrThreadGroups_lock , Mutex, nonleaf+1, true); | 283 def(JfrThreadGroups_lock , Mutex, nonleaf+1, true); |
280 def(JfrStream_lock , Mutex, nonleaf+2, true); | 284 def(JfrStream_lock , Mutex, nonleaf+2, true); |
281 def(JfrStacktrace_lock , Mutex, special, true ); | 285 def(JfrStacktrace_lock , Mutex, special, true ); |
282 #endif | 286 #endif |
283 | 287 |
288 #ifdef GRAAL | |
289 def(GraalInitialization_lock , Monitor, nonleaf+5, false); | |
290 #endif | |
284 } | 291 } |
285 | 292 |
286 GCMutexLocker::GCMutexLocker(Monitor * mutex) { | 293 GCMutexLocker::GCMutexLocker(Monitor * mutex) { |
287 if (SafepointSynchronize::is_at_safepoint()) { | 294 if (SafepointSynchronize::is_at_safepoint()) { |
288 _locked = false; | 295 _locked = false; |