mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8023457: Event based tracing framework needs a mutex for thread groups
Reviewed-by: acorn, sla
This commit is contained in:
parent
626bd19644
commit
ea17b8decf
2 changed files with 16 additions and 8 deletions
|
@ -124,13 +124,15 @@ Monitor* GCTaskManager_lock = NULL;
|
||||||
|
|
||||||
Mutex* Management_lock = NULL;
|
Mutex* Management_lock = NULL;
|
||||||
Monitor* Service_lock = NULL;
|
Monitor* Service_lock = NULL;
|
||||||
Mutex* Stacktrace_lock = NULL;
|
Monitor* PeriodicTask_lock = NULL;
|
||||||
|
|
||||||
Monitor* JfrQuery_lock = NULL;
|
#ifdef INCLUDE_TRACE
|
||||||
|
Mutex* JfrStacktrace_lock = NULL;
|
||||||
Monitor* JfrMsg_lock = NULL;
|
Monitor* JfrMsg_lock = NULL;
|
||||||
Mutex* JfrBuffer_lock = NULL;
|
Mutex* JfrBuffer_lock = NULL;
|
||||||
Mutex* JfrStream_lock = NULL;
|
Mutex* JfrStream_lock = NULL;
|
||||||
Monitor* PeriodicTask_lock = NULL;
|
Mutex* JfrThreadGroups_lock = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MAX_NUM_MUTEX 128
|
#define MAX_NUM_MUTEX 128
|
||||||
static Monitor * _mutex_array[MAX_NUM_MUTEX];
|
static Monitor * _mutex_array[MAX_NUM_MUTEX];
|
||||||
|
@ -206,7 +208,6 @@ void mutex_init() {
|
||||||
def(Patching_lock , Mutex , special, true ); // used for safepointing and code patching.
|
def(Patching_lock , Mutex , special, true ); // used for safepointing and code patching.
|
||||||
def(ObjAllocPost_lock , Monitor, special, false);
|
def(ObjAllocPost_lock , Monitor, special, false);
|
||||||
def(Service_lock , Monitor, special, true ); // used for service thread operations
|
def(Service_lock , Monitor, special, true ); // used for service thread operations
|
||||||
def(Stacktrace_lock , Mutex, special, true ); // used for JFR stacktrace database
|
|
||||||
def(JmethodIdCreation_lock , Mutex , leaf, true ); // used for creating jmethodIDs.
|
def(JmethodIdCreation_lock , Mutex , leaf, true ); // used for creating jmethodIDs.
|
||||||
|
|
||||||
def(SystemDictionary_lock , Monitor, leaf, true ); // lookups done by VM thread
|
def(SystemDictionary_lock , Monitor, leaf, true ); // lookups done by VM thread
|
||||||
|
@ -272,11 +273,16 @@ void mutex_init() {
|
||||||
def(Debug3_lock , Mutex , nonleaf+4, true );
|
def(Debug3_lock , Mutex , nonleaf+4, true );
|
||||||
def(ProfileVM_lock , Monitor, special, false); // used for profiling of the VMThread
|
def(ProfileVM_lock , Monitor, special, false); // used for profiling of the VMThread
|
||||||
def(CompileThread_lock , Monitor, nonleaf+5, false );
|
def(CompileThread_lock , Monitor, nonleaf+5, false );
|
||||||
|
def(PeriodicTask_lock , Monitor, nonleaf+5, true);
|
||||||
|
|
||||||
|
#ifdef INCLUDE_TRACE
|
||||||
def(JfrMsg_lock , Monitor, leaf, true);
|
def(JfrMsg_lock , Monitor, leaf, true);
|
||||||
def(JfrBuffer_lock , Mutex, nonleaf+1, true);
|
def(JfrBuffer_lock , Mutex, nonleaf+1, true);
|
||||||
|
def(JfrThreadGroups_lock , Mutex, nonleaf+1, true);
|
||||||
def(JfrStream_lock , Mutex, nonleaf+2, true);
|
def(JfrStream_lock , Mutex, nonleaf+2, true);
|
||||||
def(PeriodicTask_lock , Monitor, nonleaf+5, true);
|
def(JfrStacktrace_lock , Mutex, special, true );
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GCMutexLocker::GCMutexLocker(Monitor * mutex) {
|
GCMutexLocker::GCMutexLocker(Monitor * mutex) {
|
||||||
|
|
|
@ -137,13 +137,15 @@ extern Mutex* HotCardCache_lock; // protects the hot card cache
|
||||||
|
|
||||||
extern Mutex* Management_lock; // a lock used to serialize JVM management
|
extern Mutex* Management_lock; // a lock used to serialize JVM management
|
||||||
extern Monitor* Service_lock; // a lock used for service thread operation
|
extern Monitor* Service_lock; // a lock used for service thread operation
|
||||||
extern Mutex* Stacktrace_lock; // used to guard access to the stacktrace table
|
extern Monitor* PeriodicTask_lock; // protects the periodic task structure
|
||||||
|
|
||||||
extern Monitor* JfrQuery_lock; // protects JFR use
|
#ifdef INCLUDE_TRACE
|
||||||
|
extern Mutex* JfrStacktrace_lock; // used to guard access to the JFR stacktrace table
|
||||||
extern Monitor* JfrMsg_lock; // protects JFR messaging
|
extern Monitor* JfrMsg_lock; // protects JFR messaging
|
||||||
extern Mutex* JfrBuffer_lock; // protects JFR buffer operations
|
extern Mutex* JfrBuffer_lock; // protects JFR buffer operations
|
||||||
extern Mutex* JfrStream_lock; // protects JFR stream access
|
extern Mutex* JfrStream_lock; // protects JFR stream access
|
||||||
extern Monitor* PeriodicTask_lock; // protects the periodic task structure
|
extern Mutex* JfrThreadGroups_lock; // protects JFR access to Thread Groups
|
||||||
|
#endif
|
||||||
|
|
||||||
// A MutexLocker provides mutual exclusion with respect to a given mutex
|
// A MutexLocker provides mutual exclusion with respect to a given mutex
|
||||||
// for the scope which contains the locker. The lock is an OS lock, not
|
// for the scope which contains the locker. The lock is an OS lock, not
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue