8272788: Nonleaf ranked locks should not be safepoint_check_never
Reviewed-by: eosterlund, pchilanomate
This commit is contained in:
parent
4ee0dacecd
commit
9689f61520
src/hotspot/share
@ -72,7 +72,7 @@ bool JvmtiTagMap::_has_object_free_events = false;
|
||||
// create a JvmtiTagMap
|
||||
JvmtiTagMap::JvmtiTagMap(JvmtiEnv* env) :
|
||||
_env(env),
|
||||
_lock(Mutex::nonleaf+1, "JvmtiTagMap_lock", Mutex::_safepoint_check_never),
|
||||
_lock(Mutex::leaf, "JvmtiTagMap_lock", Mutex::_safepoint_check_never),
|
||||
_needs_rehashing(false),
|
||||
_needs_cleaning(false) {
|
||||
|
||||
|
@ -285,6 +285,9 @@ Mutex::Mutex(int Rank, const char * name, SafepointCheckRequired safepoint_check
|
||||
_safepoint_check_required = safepoint_check_required;
|
||||
_skip_rank_check = false;
|
||||
|
||||
assert(_rank < nonleaf || _safepoint_check_required == _safepoint_check_always,
|
||||
"higher than nonleaf should safepoint %s", name);
|
||||
|
||||
assert(_rank > special || _safepoint_check_required == _safepoint_check_never,
|
||||
"Special locks or below should never safepoint");
|
||||
|
||||
|
@ -99,10 +99,6 @@ Mutex* NMethodSweeperStats_lock = NULL;
|
||||
Mutex* FullGCALot_lock = NULL;
|
||||
#endif
|
||||
|
||||
Mutex* Debug1_lock = NULL;
|
||||
Mutex* Debug2_lock = NULL;
|
||||
Mutex* Debug3_lock = NULL;
|
||||
|
||||
Mutex* tty_lock = NULL;
|
||||
|
||||
Mutex* RawMonitor_lock = NULL;
|
||||
@ -128,7 +124,6 @@ Monitor* Zip_lock = NULL;
|
||||
Mutex* JfrStacktrace_lock = NULL;
|
||||
Monitor* JfrMsg_lock = NULL;
|
||||
Mutex* JfrBuffer_lock = NULL;
|
||||
Mutex* JfrStream_lock = NULL;
|
||||
Monitor* JfrThreadSampler_lock = NULL;
|
||||
#endif
|
||||
|
||||
@ -264,7 +259,6 @@ void mutex_init() {
|
||||
def(SymbolArena_lock , PaddedMutex , leaf+2, true, _safepoint_check_never);
|
||||
def(ProfilePrint_lock , PaddedMutex , leaf, false, _safepoint_check_always); // serial profile printing
|
||||
def(ExceptionCache_lock , PaddedMutex , leaf, false, _safepoint_check_always); // serial profile printing
|
||||
def(Debug1_lock , PaddedMutex , leaf, true, _safepoint_check_never);
|
||||
#ifndef PRODUCT
|
||||
def(FullGCALot_lock , PaddedMutex , leaf, false, _safepoint_check_always); // a lock to make FullGCALot MT safe
|
||||
#endif
|
||||
@ -280,7 +274,7 @@ void mutex_init() {
|
||||
def(RetData_lock , PaddedMutex , nonleaf, false, _safepoint_check_always);
|
||||
def(Terminator_lock , PaddedMonitor, nonleaf, true, _safepoint_check_always);
|
||||
def(InitCompleted_lock , PaddedMonitor, leaf, true, _safepoint_check_never);
|
||||
def(VtableStubs_lock , PaddedMutex , nonleaf, true, _safepoint_check_never);
|
||||
def(VtableStubs_lock , PaddedMutex , leaf, true, _safepoint_check_never);
|
||||
def(Notify_lock , PaddedMonitor, nonleaf, true, _safepoint_check_always);
|
||||
def(JNICritical_lock , PaddedMonitor, nonleaf, true, _safepoint_check_always); // used for JNI critical regions
|
||||
def(AdapterHandlerLibrary_lock , PaddedMutex , nonleaf, true, _safepoint_check_always);
|
||||
@ -288,7 +282,7 @@ void mutex_init() {
|
||||
def(Heap_lock , PaddedMonitor, nonleaf+1, false, _safepoint_check_always); // Doesn't safepoint check during termination.
|
||||
def(JfieldIdCreation_lock , PaddedMutex , nonleaf+1, true, _safepoint_check_always); // jfieldID, Used in VM_Operation
|
||||
|
||||
def(CompiledIC_lock , PaddedMutex , nonleaf+2, true, _safepoint_check_never); // locks VtableStubs_lock, InlineCacheBuffer_lock
|
||||
def(CompiledIC_lock , PaddedMutex , leaf+2, true, _safepoint_check_never); // locks VtableStubs_lock, InlineCacheBuffer_lock
|
||||
def(CompileTaskAlloc_lock , PaddedMutex , nonleaf+2, true, _safepoint_check_always);
|
||||
def(CompileStatistics_lock , PaddedMutex , nonleaf+2, false, _safepoint_check_always);
|
||||
def(DirectivesStack_lock , PaddedMutex , special, true, _safepoint_check_never);
|
||||
@ -304,8 +298,6 @@ void mutex_init() {
|
||||
def(TouchedMethodLog_lock , PaddedMutex , nonleaf+3, false, _safepoint_check_always);
|
||||
|
||||
def(MethodCompileQueue_lock , PaddedMonitor, nonleaf+4, false, _safepoint_check_always);
|
||||
def(Debug2_lock , PaddedMutex , nonleaf+4, true, _safepoint_check_never);
|
||||
def(Debug3_lock , PaddedMutex , nonleaf+4, true, _safepoint_check_never);
|
||||
def(CompileThread_lock , PaddedMonitor, nonleaf+5, false, _safepoint_check_always);
|
||||
def(PeriodicTask_lock , PaddedMonitor, nonleaf+5, true, _safepoint_check_always);
|
||||
def(RedefineClasses_lock , PaddedMonitor, nonleaf+5, true, _safepoint_check_always);
|
||||
@ -319,7 +311,6 @@ void mutex_init() {
|
||||
#if INCLUDE_JFR
|
||||
def(JfrMsg_lock , PaddedMonitor, leaf, true, _safepoint_check_always);
|
||||
def(JfrBuffer_lock , PaddedMutex , leaf, true, _safepoint_check_never);
|
||||
def(JfrStream_lock , PaddedMutex , nonleaf + 1, true, _safepoint_check_never);
|
||||
def(JfrStacktrace_lock , PaddedMutex , stackwatermark-1, true, _safepoint_check_never);
|
||||
def(JfrThreadSampler_lock , PaddedMonitor, leaf, true, _safepoint_check_never);
|
||||
#endif
|
||||
|
@ -93,9 +93,6 @@ extern Mutex* NMethodSweeperStats_lock; // a lock used to serialize acc
|
||||
#ifndef PRODUCT
|
||||
extern Mutex* FullGCALot_lock; // a lock to make FullGCALot MT safe
|
||||
#endif // PRODUCT
|
||||
extern Mutex* Debug1_lock; // A bunch of pre-allocated locks that can be used for tracing
|
||||
extern Mutex* Debug2_lock; // down synchronization related bugs!
|
||||
extern Mutex* Debug3_lock;
|
||||
|
||||
extern Mutex* RawMonitor_lock;
|
||||
extern Mutex* PerfDataMemAlloc_lock; // a lock on the allocator for PerfData memory for performance data
|
||||
@ -137,7 +134,6 @@ extern Mutex* LambdaFormInvokers_lock; // Protecting LambdaFormInvoker
|
||||
extern Mutex* JfrStacktrace_lock; // used to guard access to the JFR stacktrace table
|
||||
extern Monitor* JfrMsg_lock; // protects JFR messaging
|
||||
extern Mutex* JfrBuffer_lock; // protects JFR buffer operations
|
||||
extern Mutex* JfrStream_lock; // protects JFR stream access
|
||||
extern Monitor* JfrThreadSampler_lock; // used to suspend/resume JFR thread sampler
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user