28 #include "memory/allocation.hpp"
29 #include "runtime/mutex.hpp"
30
31 // Mutexes used in the VM.
32
33 extern Mutex* Patching_lock; // a lock used to guard code patching of compiled code
34 extern Monitor* SystemDictionary_lock; // a lock on the system dictionary
35 extern Mutex* PackageTable_lock; // a lock on the class loader package table
36 extern Mutex* CompiledIC_lock; // a lock used to guard compiled IC patching and access
37 extern Mutex* InlineCacheBuffer_lock; // a lock used to guard the InlineCacheBuffer
38 extern Mutex* VMStatistic_lock; // a lock used to guard statistics count increment
39 extern Mutex* JNIGlobalHandle_lock; // a lock on creating JNI global handles
40 extern Mutex* JNIHandleBlockFreeList_lock; // a lock on the JNI handle block free list
41 extern Mutex* MemberNameTable_lock; // a lock on the MemberNameTable updates
42 extern Mutex* JmethodIdCreation_lock; // a lock on creating JNI method identifiers
43 extern Mutex* JfieldIdCreation_lock; // a lock on creating JNI static field identifiers
44 extern Monitor* JNICritical_lock; // a lock used while entering and exiting JNI critical regions, allows GC to sometimes get in
45 extern Mutex* JvmtiThreadState_lock; // a lock on modification of JVMTI thread data
46 extern Monitor* JvmtiPendingEvent_lock; // a lock on the JVMTI pending events list
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* SymbolTable_lock; // a lock on the symbol table
53 extern Mutex* StringTable_lock; // a lock on the interned string table
54 extern Monitor* StringDedupQueue_lock; // a lock on the string deduplication queue
55 extern Mutex* StringDedupTable_lock; // a lock on the string deduplication table
56 extern Monitor* CodeCache_lock; // a lock on the CodeCache, rank is special, use MutexLockerEx
57 extern Mutex* MethodData_lock; // a lock on installation of method data
58 extern Mutex* TouchedMethodLog_lock; // a lock on allocation of LogExecutedMethods info
59 extern Mutex* RetData_lock; // a lock on installation of RetData inside method data
60 extern Mutex* DerivedPointerTableGC_lock; // a lock to protect the derived pointer table
61 extern Monitor* VMOperationQueue_lock; // a lock on queue of vm_operations waiting to execute
62 extern Monitor* VMOperationRequest_lock; // a lock on Threads waiting for a vm_operation to terminate
63 extern Monitor* Safepoint_lock; // a lock used by the safepoint abstraction
64 extern Monitor* Threads_lock; // a lock on the Threads table of active Java threads
65 // (also used by Safepoints too to block threads creation/destruction)
66 extern Monitor* CGC_lock; // used for coordination between
67 // fore- & background GC threads.
85 extern Mutex* Shared_DirtyCardQ_lock; // Lock protecting dirty card
86 // queue shared by
87 // non-Java threads.
88 // (see option ExplicitGCInvokesConcurrent)
89 extern Mutex* ParGCRareEvent_lock; // Synchronizes various (rare) parallel GC ops.
90 extern Mutex* Compile_lock; // a lock held when Compilation is updating code (used to block CodeCache traversal, CHA updates, etc)
91 extern Monitor* MethodCompileQueue_lock; // a lock held when method compilations are enqueued, dequeued
92 extern Monitor* CompileThread_lock; // a lock held by compile threads during compilation system initialization
93 extern Monitor* Compilation_lock; // a lock used to pause compilation
94 extern Mutex* CompileTaskAlloc_lock; // a lock held when CompileTasks are allocated
95 extern Mutex* CompileStatistics_lock; // a lock held when updating compilation statistics
96 extern Mutex* MultiArray_lock; // a lock used to guard allocation of multi-dim arrays
97 extern Monitor* Terminator_lock; // a lock used to guard termination of the vm
98 extern Monitor* BeforeExit_lock; // a lock used to guard cleanups and shutdown hooks
99 extern Monitor* Notify_lock; // a lock used to synchronize the start-up of the vm
100 extern Monitor* Interrupt_lock; // a lock used for condition variable mediated interrupt processing
101 extern Monitor* ProfileVM_lock; // a lock used for profiling the VMThread
102 extern Mutex* ProfilePrint_lock; // a lock used to serialize the printing of profiles
103 extern Mutex* ExceptionCache_lock; // a lock used to synchronize exception cache updates
104 extern Mutex* OsrList_lock; // a lock used to serialize access to OSR queues
105
106 #ifndef PRODUCT
107 extern Mutex* FullGCALot_lock; // a lock to make FullGCALot MT safe
108 #endif // PRODUCT
109 extern Mutex* Debug1_lock; // A bunch of pre-allocated locks that can be used for tracing
110 extern Mutex* Debug2_lock; // down synchronization related bugs!
111 extern Mutex* Debug3_lock;
112
113 extern Mutex* RawMonitor_lock;
114 extern Mutex* PerfDataMemAlloc_lock; // a lock on the allocator for PerfData memory for performance data
115 extern Mutex* PerfDataManager_lock; // a long on access to PerfDataManager resources
116 extern Mutex* ParkerFreeList_lock;
117 extern Mutex* OopMapCacheAlloc_lock; // protects allocation of oop_map caches
118
119 extern Mutex* FreeList_lock; // protects the free region list during safepoints
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 extern Mutex* MMUTracker_lock; // protects the MMU
124 // tracker data structures
|
28 #include "memory/allocation.hpp"
29 #include "runtime/mutex.hpp"
30
31 // Mutexes used in the VM.
32
33 extern Mutex* Patching_lock; // a lock used to guard code patching of compiled code
34 extern Monitor* SystemDictionary_lock; // a lock on the system dictionary
35 extern Mutex* PackageTable_lock; // a lock on the class loader package table
36 extern Mutex* CompiledIC_lock; // a lock used to guard compiled IC patching and access
37 extern Mutex* InlineCacheBuffer_lock; // a lock used to guard the InlineCacheBuffer
38 extern Mutex* VMStatistic_lock; // a lock used to guard statistics count increment
39 extern Mutex* JNIGlobalHandle_lock; // a lock on creating JNI global handles
40 extern Mutex* JNIHandleBlockFreeList_lock; // a lock on the JNI handle block free list
41 extern Mutex* MemberNameTable_lock; // a lock on the MemberNameTable updates
42 extern Mutex* JmethodIdCreation_lock; // a lock on creating JNI method identifiers
43 extern Mutex* JfieldIdCreation_lock; // a lock on creating JNI static field identifiers
44 extern Monitor* JNICritical_lock; // a lock used while entering and exiting JNI critical regions, allows GC to sometimes get in
45 extern Mutex* JvmtiThreadState_lock; // a lock on modification of JVMTI thread data
46 extern Monitor* JvmtiPendingEvent_lock; // a lock on the JVMTI pending events list
47 extern Monitor* Heap_lock; // a lock on the heap
48 extern Monitor* ShenandoahHeap_lock; // a lock on the heap, used by ShenandoahGC when evacuating at a safepoint
49 extern Monitor* ShenandoahFullGC_lock; // a monitor to wait/notify the Shenandoah background thread on full-GC requests
50 extern Monitor* ShenandoahJNICritical_lock; // a monitor to wait/notify the Shenandoah background thread on full-GC requests
51 extern Mutex* ExpandHeap_lock; // a lock on expanding the heap
52 extern Mutex* AdapterHandlerLibrary_lock; // a lock on the AdapterHandlerLibrary
53 extern Mutex* SignatureHandlerLibrary_lock; // a lock on the SignatureHandlerLibrary
54 extern Mutex* VtableStubs_lock; // a lock on the VtableStubs
55 extern Mutex* SymbolTable_lock; // a lock on the symbol table
56 extern Mutex* StringTable_lock; // a lock on the interned string table
57 extern Monitor* StringDedupQueue_lock; // a lock on the string deduplication queue
58 extern Mutex* StringDedupTable_lock; // a lock on the string deduplication table
59 extern Monitor* CodeCache_lock; // a lock on the CodeCache, rank is special, use MutexLockerEx
60 extern Mutex* MethodData_lock; // a lock on installation of method data
61 extern Mutex* TouchedMethodLog_lock; // a lock on allocation of LogExecutedMethods info
62 extern Mutex* RetData_lock; // a lock on installation of RetData inside method data
63 extern Mutex* DerivedPointerTableGC_lock; // a lock to protect the derived pointer table
64 extern Monitor* VMOperationQueue_lock; // a lock on queue of vm_operations waiting to execute
65 extern Monitor* VMOperationRequest_lock; // a lock on Threads waiting for a vm_operation to terminate
66 extern Monitor* Safepoint_lock; // a lock used by the safepoint abstraction
67 extern Monitor* Threads_lock; // a lock on the Threads table of active Java threads
68 // (also used by Safepoints too to block threads creation/destruction)
69 extern Monitor* CGC_lock; // used for coordination between
70 // fore- & background GC threads.
88 extern Mutex* Shared_DirtyCardQ_lock; // Lock protecting dirty card
89 // queue shared by
90 // non-Java threads.
91 // (see option ExplicitGCInvokesConcurrent)
92 extern Mutex* ParGCRareEvent_lock; // Synchronizes various (rare) parallel GC ops.
93 extern Mutex* Compile_lock; // a lock held when Compilation is updating code (used to block CodeCache traversal, CHA updates, etc)
94 extern Monitor* MethodCompileQueue_lock; // a lock held when method compilations are enqueued, dequeued
95 extern Monitor* CompileThread_lock; // a lock held by compile threads during compilation system initialization
96 extern Monitor* Compilation_lock; // a lock used to pause compilation
97 extern Mutex* CompileTaskAlloc_lock; // a lock held when CompileTasks are allocated
98 extern Mutex* CompileStatistics_lock; // a lock held when updating compilation statistics
99 extern Mutex* MultiArray_lock; // a lock used to guard allocation of multi-dim arrays
100 extern Monitor* Terminator_lock; // a lock used to guard termination of the vm
101 extern Monitor* BeforeExit_lock; // a lock used to guard cleanups and shutdown hooks
102 extern Monitor* Notify_lock; // a lock used to synchronize the start-up of the vm
103 extern Monitor* Interrupt_lock; // a lock used for condition variable mediated interrupt processing
104 extern Monitor* ProfileVM_lock; // a lock used for profiling the VMThread
105 extern Mutex* ProfilePrint_lock; // a lock used to serialize the printing of profiles
106 extern Mutex* ExceptionCache_lock; // a lock used to synchronize exception cache updates
107 extern Mutex* OsrList_lock; // a lock used to serialize access to OSR queues
108 extern Monitor* ShenandoahMemProtect_lock; // ShenandoahGC uses this for memory protection to verify operations on the heap.
109
110 #ifndef PRODUCT
111 extern Mutex* FullGCALot_lock; // a lock to make FullGCALot MT safe
112 #endif // PRODUCT
113 extern Mutex* Debug1_lock; // A bunch of pre-allocated locks that can be used for tracing
114 extern Mutex* Debug2_lock; // down synchronization related bugs!
115 extern Mutex* Debug3_lock;
116
117 extern Mutex* RawMonitor_lock;
118 extern Mutex* PerfDataMemAlloc_lock; // a lock on the allocator for PerfData memory for performance data
119 extern Mutex* PerfDataManager_lock; // a long on access to PerfDataManager resources
120 extern Mutex* ParkerFreeList_lock;
121 extern Mutex* OopMapCacheAlloc_lock; // protects allocation of oop_map caches
122
123 extern Mutex* FreeList_lock; // protects the free region list during safepoints
124 extern Monitor* SecondaryFreeList_lock; // protects the secondary free region list
125 extern Mutex* OldSets_lock; // protects the old region sets
126 extern Monitor* RootRegionScan_lock; // used to notify that the CM threads have finished scanning the IM snapshot regions
127 extern Mutex* MMUTracker_lock; // protects the MMU
128 // tracker data structures
|