15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_RUNTIME_MUTEXLOCKER_HPP
26 #define SHARE_RUNTIME_MUTEXLOCKER_HPP
27
28 #include "memory/allocation.hpp"
29 #include "runtime/flags/flagSetting.hpp"
30 #include "runtime/mutex.hpp"
31
32 // Mutexes used in the VM.
33
34 extern Mutex* Patching_lock; // a lock used to guard code patching of compiled code
35 extern Monitor* SystemDictionary_lock; // a lock on the system dictionary
36 extern Mutex* ProtectionDomainSet_lock; // a lock on the pd_set list in the system dictionary
37 extern Mutex* SharedDictionary_lock; // a lock on the CDS shared dictionary
38 extern Mutex* Module_lock; // a lock on module and package related data structures
39 extern Mutex* CompiledIC_lock; // a lock used to guard compiled IC patching and access
40 extern Mutex* InlineCacheBuffer_lock; // a lock used to guard the InlineCacheBuffer
41 extern Mutex* VMStatistic_lock; // a lock used to guard statistics count increment
42 extern Mutex* JNIHandleBlockFreeList_lock; // a lock on the JNI handle block free list
43 extern Mutex* JmethodIdCreation_lock; // a lock on creating JNI method identifiers
44 extern Mutex* JfieldIdCreation_lock; // a lock on creating JNI static field identifiers
45 extern Monitor* JNICritical_lock; // a lock used while entering and exiting JNI critical regions, allows GC to sometimes get in
46 extern Mutex* JvmtiThreadState_lock; // a lock on modification of JVMTI thread data
47 extern Monitor* Heap_lock; // a lock on the heap
48 extern Mutex* ExpandHeap_lock; // a lock on expanding the heap
49 extern Mutex* AdapterHandlerLibrary_lock; // a lock on the AdapterHandlerLibrary
50 extern Mutex* SignatureHandlerLibrary_lock; // a lock on the SignatureHandlerLibrary
51 extern Mutex* VtableStubs_lock; // a lock on the VtableStubs
52 extern Mutex* SymbolArena_lock; // a lock on the symbol table arena
53 extern Monitor* StringDedupQueue_lock; // a lock on the string deduplication queue
54 extern Mutex* StringDedupTable_lock; // a lock on the string deduplication table
73 // queue shared by
74 // non-Java threads.
75 extern Mutex* MarkStackFreeList_lock; // Protects access to the global mark stack free list.
76 extern Mutex* MarkStackChunkList_lock; // Protects access to the global mark stack chunk list.
77 extern Mutex* MonitoringSupport_lock; // Protects updates to the serviceability memory pools.
78 extern Mutex* ParGCRareEvent_lock; // Synchronizes various (rare) parallel GC ops.
79 extern Mutex* Compile_lock; // a lock held when Compilation is updating code (used to block CodeCache traversal, CHA updates, etc)
80 extern Monitor* MethodCompileQueue_lock; // a lock held when method compilations are enqueued, dequeued
81 extern Monitor* CompileThread_lock; // a lock held by compile threads during compilation system initialization
82 extern Monitor* Compilation_lock; // a lock used to pause compilation
83 extern Mutex* CompileTaskAlloc_lock; // a lock held when CompileTasks are allocated
84 extern Mutex* CompileStatistics_lock; // a lock held when updating compilation statistics
85 extern Mutex* DirectivesStack_lock; // a lock held when mutating the dirstack and ref counting directives
86 extern Mutex* MultiArray_lock; // a lock used to guard allocation of multi-dim arrays
87 extern Monitor* Terminator_lock; // a lock used to guard termination of the vm
88 extern Monitor* InitCompleted_lock; // a lock used to signal threads waiting on init completed
89 extern Monitor* BeforeExit_lock; // a lock used to guard cleanups and shutdown hooks
90 extern Monitor* Notify_lock; // a lock used to synchronize the start-up of the vm
91 extern Mutex* ProfilePrint_lock; // a lock used to serialize the printing of profiles
92 extern Mutex* ExceptionCache_lock; // a lock used to synchronize exception cache updates
93 extern Mutex* OsrList_lock; // a lock used to serialize access to OSR queues
94 extern Mutex* NMethodSweeperStats_lock; // a lock used to serialize access to sweeper statistics
95
96 #ifndef PRODUCT
97 extern Mutex* FullGCALot_lock; // a lock to make FullGCALot MT safe
98 #endif // PRODUCT
99 extern Mutex* Debug1_lock; // A bunch of pre-allocated locks that can be used for tracing
100 extern Mutex* Debug2_lock; // down synchronization related bugs!
101 extern Mutex* Debug3_lock;
102
103 extern Mutex* RawMonitor_lock;
104 extern Mutex* PerfDataMemAlloc_lock; // a lock on the allocator for PerfData memory for performance data
105 extern Mutex* PerfDataManager_lock; // a long on access to PerfDataManager resources
106 extern Mutex* ParkerFreeList_lock;
107 extern Mutex* OopMapCacheAlloc_lock; // protects allocation of oop_map caches
108
109 extern Mutex* FreeList_lock; // protects the free region list during safepoints
110 extern Mutex* OldSets_lock; // protects the old region sets
111 extern Monitor* RootRegionScan_lock; // used to notify that the CM threads have finished scanning the IM snapshot regions
112
113 extern Mutex* Management_lock; // a lock used to serialize JVM management
|
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_RUNTIME_MUTEXLOCKER_HPP
26 #define SHARE_RUNTIME_MUTEXLOCKER_HPP
27
28 #include "memory/allocation.hpp"
29 #include "runtime/flags/flagSetting.hpp"
30 #include "runtime/mutex.hpp"
31
32 // Mutexes used in the VM.
33
34 extern Mutex* Patching_lock; // a lock used to guard code patching of compiled code
35 extern Mutex* CompiledMethod_lock; // a lock used to guard a compiled method
36 extern Monitor* SystemDictionary_lock; // a lock on the system dictionary
37 extern Mutex* ProtectionDomainSet_lock; // a lock on the pd_set list in the system dictionary
38 extern Mutex* SharedDictionary_lock; // a lock on the CDS shared dictionary
39 extern Mutex* Module_lock; // a lock on module and package related data structures
40 extern Mutex* CompiledIC_lock; // a lock used to guard compiled IC patching and access
41 extern Mutex* InlineCacheBuffer_lock; // a lock used to guard the InlineCacheBuffer
42 extern Mutex* VMStatistic_lock; // a lock used to guard statistics count increment
43 extern Mutex* JNIHandleBlockFreeList_lock; // a lock on the JNI handle block free list
44 extern Mutex* JmethodIdCreation_lock; // a lock on creating JNI method identifiers
45 extern Mutex* JfieldIdCreation_lock; // a lock on creating JNI static field identifiers
46 extern Monitor* JNICritical_lock; // a lock used while entering and exiting JNI critical regions, allows GC to sometimes get in
47 extern Mutex* JvmtiThreadState_lock; // a lock on modification of JVMTI thread data
48 extern Monitor* Heap_lock; // a lock on the heap
49 extern Mutex* ExpandHeap_lock; // a lock on expanding the heap
50 extern Mutex* AdapterHandlerLibrary_lock; // a lock on the AdapterHandlerLibrary
51 extern Mutex* SignatureHandlerLibrary_lock; // a lock on the SignatureHandlerLibrary
52 extern Mutex* VtableStubs_lock; // a lock on the VtableStubs
53 extern Mutex* SymbolArena_lock; // a lock on the symbol table arena
54 extern Monitor* StringDedupQueue_lock; // a lock on the string deduplication queue
55 extern Mutex* StringDedupTable_lock; // a lock on the string deduplication table
74 // queue shared by
75 // non-Java threads.
76 extern Mutex* MarkStackFreeList_lock; // Protects access to the global mark stack free list.
77 extern Mutex* MarkStackChunkList_lock; // Protects access to the global mark stack chunk list.
78 extern Mutex* MonitoringSupport_lock; // Protects updates to the serviceability memory pools.
79 extern Mutex* ParGCRareEvent_lock; // Synchronizes various (rare) parallel GC ops.
80 extern Mutex* Compile_lock; // a lock held when Compilation is updating code (used to block CodeCache traversal, CHA updates, etc)
81 extern Monitor* MethodCompileQueue_lock; // a lock held when method compilations are enqueued, dequeued
82 extern Monitor* CompileThread_lock; // a lock held by compile threads during compilation system initialization
83 extern Monitor* Compilation_lock; // a lock used to pause compilation
84 extern Mutex* CompileTaskAlloc_lock; // a lock held when CompileTasks are allocated
85 extern Mutex* CompileStatistics_lock; // a lock held when updating compilation statistics
86 extern Mutex* DirectivesStack_lock; // a lock held when mutating the dirstack and ref counting directives
87 extern Mutex* MultiArray_lock; // a lock used to guard allocation of multi-dim arrays
88 extern Monitor* Terminator_lock; // a lock used to guard termination of the vm
89 extern Monitor* InitCompleted_lock; // a lock used to signal threads waiting on init completed
90 extern Monitor* BeforeExit_lock; // a lock used to guard cleanups and shutdown hooks
91 extern Monitor* Notify_lock; // a lock used to synchronize the start-up of the vm
92 extern Mutex* ProfilePrint_lock; // a lock used to serialize the printing of profiles
93 extern Mutex* ExceptionCache_lock; // a lock used to synchronize exception cache updates
94 extern Mutex* NMethodSweeperStats_lock; // a lock used to serialize access to sweeper statistics
95
96 #ifndef PRODUCT
97 extern Mutex* FullGCALot_lock; // a lock to make FullGCALot MT safe
98 #endif // PRODUCT
99 extern Mutex* Debug1_lock; // A bunch of pre-allocated locks that can be used for tracing
100 extern Mutex* Debug2_lock; // down synchronization related bugs!
101 extern Mutex* Debug3_lock;
102
103 extern Mutex* RawMonitor_lock;
104 extern Mutex* PerfDataMemAlloc_lock; // a lock on the allocator for PerfData memory for performance data
105 extern Mutex* PerfDataManager_lock; // a long on access to PerfDataManager resources
106 extern Mutex* ParkerFreeList_lock;
107 extern Mutex* OopMapCacheAlloc_lock; // protects allocation of oop_map caches
108
109 extern Mutex* FreeList_lock; // protects the free region list during safepoints
110 extern Mutex* OldSets_lock; // protects the old region sets
111 extern Monitor* RootRegionScan_lock; // used to notify that the CM threads have finished scanning the IM snapshot regions
112
113 extern Mutex* Management_lock; // a lock used to serialize JVM management
|