Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/mutexLocker.cpp @ 6939:c284cf4781f0
7127792: Add the ability to change an existing PeriodicTask's execution interval
Summary: Enables dynamic enrollment / disenrollment from the PeriodicTasks in WatcherThread.
Reviewed-by: dholmes, mgronlun
author | rbackman |
---|---|
date | Thu, 04 Oct 2012 14:55:57 +0200 |
parents | da91efe96a93 |
children | e522a00b91aa f34d701e952e |
comparison
equal
deleted
inserted
replaced
6938:8940ddc1036f | 6939:c284cf4781f0 |
---|---|
138 | 138 |
139 Monitor* JfrQuery_lock = NULL; | 139 Monitor* JfrQuery_lock = NULL; |
140 Monitor* JfrMsg_lock = NULL; | 140 Monitor* JfrMsg_lock = NULL; |
141 Mutex* JfrBuffer_lock = NULL; | 141 Mutex* JfrBuffer_lock = NULL; |
142 Mutex* JfrStream_lock = NULL; | 142 Mutex* JfrStream_lock = NULL; |
143 Monitor* PeriodicTask_lock = NULL; | |
143 | 144 |
144 #define MAX_NUM_MUTEX 128 | 145 #define MAX_NUM_MUTEX 128 |
145 static Monitor * _mutex_array[MAX_NUM_MUTEX]; | 146 static Monitor * _mutex_array[MAX_NUM_MUTEX]; |
146 static int _num_mutex; | 147 static int _num_mutex; |
147 | 148 |
283 | 284 |
284 def(JfrQuery_lock , Monitor, nonleaf, true); // JFR locks, keep these in consecutive order | 285 def(JfrQuery_lock , Monitor, nonleaf, true); // JFR locks, keep these in consecutive order |
285 def(JfrMsg_lock , Monitor, nonleaf+2, true); | 286 def(JfrMsg_lock , Monitor, nonleaf+2, true); |
286 def(JfrBuffer_lock , Mutex, nonleaf+3, true); | 287 def(JfrBuffer_lock , Mutex, nonleaf+3, true); |
287 def(JfrStream_lock , Mutex, nonleaf+4, true); | 288 def(JfrStream_lock , Mutex, nonleaf+4, true); |
289 def(PeriodicTask_lock , Monitor, nonleaf+5, true); | |
288 } | 290 } |
289 | 291 |
290 GCMutexLocker::GCMutexLocker(Monitor * mutex) { | 292 GCMutexLocker::GCMutexLocker(Monitor * mutex) { |
291 if (SafepointSynchronize::is_at_safepoint()) { | 293 if (SafepointSynchronize::is_at_safepoint()) { |
292 _locked = false; | 294 _locked = false; |