< prev index next >

src/hotspot/share/runtime/mutexLocker.hpp

Print this page
rev 49465 : [mq]: 8198691.patch


 120 extern Monitor* SecondaryFreeList_lock;          // protects the secondary free region list
 121 extern Mutex*   OldSets_lock;                    // protects the old region sets
 122 extern Monitor* RootRegionScan_lock;             // used to notify that the CM threads have finished scanning the IM snapshot regions
 123 
 124 extern Mutex*   Management_lock;                 // a lock used to serialize JVM management
 125 extern Monitor* Service_lock;                    // a lock used for service thread operation
 126 extern Monitor* PeriodicTask_lock;               // protects the periodic task structure
 127 extern Monitor* RedefineClasses_lock;            // locks classes from parallel redefinition
 128 
 129 #if INCLUDE_TRACE
 130 extern Mutex*   JfrStacktrace_lock;              // used to guard access to the JFR stacktrace table
 131 extern Monitor* JfrMsg_lock;                     // protects JFR messaging
 132 extern Mutex*   JfrBuffer_lock;                  // protects JFR buffer operations
 133 extern Mutex*   JfrStream_lock;                  // protects JFR stream access
 134 #endif
 135 
 136 #ifndef SUPPORTS_NATIVE_CX8
 137 extern Mutex*   UnsafeJlong_lock;                // provides Unsafe atomic updates to jlongs on platforms that don't support cx8
 138 #endif
 139 



 140 // A MutexLocker provides mutual exclusion with respect to a given mutex
 141 // for the scope which contains the locker.  The lock is an OS lock, not
 142 // an object lock, and the two do not interoperate.  Do not use Mutex-based
 143 // locks to lock on Java objects, because they will not be respected if a
 144 // that object is locked using the Java locking mechanism.
 145 //
 146 //                NOTE WELL!!
 147 //
 148 // See orderAccess.hpp.  We assume throughout the VM that MutexLocker's
 149 // and friends constructors do a fence, a lock and an acquire *in that
 150 // order*.  And that their destructors do a release and unlock, in *that*
 151 // order.  If their implementations change such that these assumptions
 152 // are violated, a whole lot of code will break.
 153 
 154 // Print all mutexes/monitors that are currently owned by a thread; called
 155 // by fatal error handler.
 156 void print_owned_locks_on_error(outputStream* st);
 157 
 158 char *lock_name(Mutex *mutex);
 159 




 120 extern Monitor* SecondaryFreeList_lock;          // protects the secondary free region list
 121 extern Mutex*   OldSets_lock;                    // protects the old region sets
 122 extern Monitor* RootRegionScan_lock;             // used to notify that the CM threads have finished scanning the IM snapshot regions
 123 
 124 extern Mutex*   Management_lock;                 // a lock used to serialize JVM management
 125 extern Monitor* Service_lock;                    // a lock used for service thread operation
 126 extern Monitor* PeriodicTask_lock;               // protects the periodic task structure
 127 extern Monitor* RedefineClasses_lock;            // locks classes from parallel redefinition
 128 
 129 #if INCLUDE_TRACE
 130 extern Mutex*   JfrStacktrace_lock;              // used to guard access to the JFR stacktrace table
 131 extern Monitor* JfrMsg_lock;                     // protects JFR messaging
 132 extern Mutex*   JfrBuffer_lock;                  // protects JFR buffer operations
 133 extern Mutex*   JfrStream_lock;                  // protects JFR stream access
 134 #endif
 135 
 136 #ifndef SUPPORTS_NATIVE_CX8
 137 extern Mutex*   UnsafeJlong_lock;                // provides Unsafe atomic updates to jlongs on platforms that don't support cx8
 138 #endif
 139 
 140 extern Monitor* CodeHeapStateAnalytics_lock;     // lock print functions against concurrent analyze functions.
 141                                                  // Only used locally in PrintCodeCacheLayout processing.
 142 
 143 // A MutexLocker provides mutual exclusion with respect to a given mutex
 144 // for the scope which contains the locker.  The lock is an OS lock, not
 145 // an object lock, and the two do not interoperate.  Do not use Mutex-based
 146 // locks to lock on Java objects, because they will not be respected if a
 147 // that object is locked using the Java locking mechanism.
 148 //
 149 //                NOTE WELL!!
 150 //
 151 // See orderAccess.hpp.  We assume throughout the VM that MutexLocker's
 152 // and friends constructors do a fence, a lock and an acquire *in that
 153 // order*.  And that their destructors do a release and unlock, in *that*
 154 // order.  If their implementations change such that these assumptions
 155 // are violated, a whole lot of code will break.
 156 
 157 // Print all mutexes/monitors that are currently owned by a thread; called
 158 // by fatal error handler.
 159 void print_owned_locks_on_error(outputStream* st);
 160 
 161 char *lock_name(Mutex *mutex);
 162 


< prev index next >