1 /*
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
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 *
98 // (see option ExplicitGCInvokesConcurrent)
99 extern Mutex* ParGCRareEvent_lock; // Synchronizes various (rare) parallel GC ops.
100 extern Mutex* EvacFailureStack_lock; // guards the evac failure scan stack
101 extern Mutex* Compile_lock; // a lock held when Compilation is updating code (used to block CodeCache traversal, CHA updates, etc)
102 extern Monitor* MethodCompileQueue_lock; // a lock held when method compilations are enqueued, dequeued
103 extern Monitor* CompileThread_lock; // a lock held by compile threads during compilation system initialization
104 extern Mutex* CompileTaskAlloc_lock; // a lock held when CompileTasks are allocated
105 extern Mutex* CompileStatistics_lock; // a lock held when updating compilation statistics
106 extern Mutex* MultiArray_lock; // a lock used to guard allocation of multi-dim arrays
107 extern Monitor* Terminator_lock; // a lock used to guard termination of the vm
108 extern Monitor* BeforeExit_lock; // a lock used to guard cleanups and shutdown hooks
109 extern Monitor* Notify_lock; // a lock used to synchronize the start-up of the vm
110 extern Monitor* Interrupt_lock; // a lock used for condition variable mediated interrupt processing
111 extern Monitor* ProfileVM_lock; // a lock used for profiling the VMThread
112 extern Mutex* ProfilePrint_lock; // a lock used to serialize the printing of profiles
113 extern Mutex* ExceptionCache_lock; // a lock used to synchronize exception cache updates
114 extern Mutex* OsrList_lock; // a lock used to serialize access to OSR queues
115
116 #ifndef PRODUCT
117 extern Mutex* FullGCALot_lock; // a lock to make FullGCALot MT safe
118 #endif
119 extern Mutex* Debug1_lock; // A bunch of pre-allocated locks that can be used for tracing
120 extern Mutex* Debug2_lock; // down synchronization related bugs!
121 extern Mutex* Debug3_lock;
122
123 extern Mutex* RawMonitor_lock;
124 extern Mutex* PerfDataMemAlloc_lock; // a lock on the allocator for PerfData memory for performance data
125 extern Mutex* PerfDataManager_lock; // a long on access to PerfDataManager resources
126 extern Mutex* ParkerFreeList_lock;
127 extern Mutex* OopMapCacheAlloc_lock; // protects allocation of oop_map caches
128
129 extern Mutex* FreeList_lock; // protects the free region list during safepoints
130 extern Monitor* SecondaryFreeList_lock; // protects the secondary free region list
131 extern Mutex* OldSets_lock; // protects the old region sets
132 extern Mutex* MMUTracker_lock; // protects the MMU
133 // tracker data structures
134 extern Mutex* HotCardCache_lock; // protects the hot card cache
135
136 extern Mutex* Management_lock; // a lock used to serialize JVM management
137 extern Monitor* Service_lock; // a lock used for service thread operation
138 extern Mutex* Stacktrace_lock; // used to guard access to the stacktrace table
139
140 extern Monitor* JfrQuery_lock; // protects JFR use
141 extern Monitor* JfrMsg_lock; // protects JFR messaging
142 extern Mutex* JfrBuffer_lock; // protects JFR buffer operations
143 extern Mutex* JfrStream_lock; // protects JFR stream access
144
145 // A MutexLocker provides mutual exclusion with respect to a given mutex
146 // for the scope which contains the locker. The lock is an OS lock, not
147 // an object lock, and the two do not interoperate. Do not use Mutex-based
148 // locks to lock on Java objects, because they will not be respected if a
149 // that object is locked using the Java locking mechanism.
150 //
151 // NOTE WELL!!
| 1 /*
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
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 *
98 // (see option ExplicitGCInvokesConcurrent)
99 extern Mutex* ParGCRareEvent_lock; // Synchronizes various (rare) parallel GC ops.
100 extern Mutex* EvacFailureStack_lock; // guards the evac failure scan stack
101 extern Mutex* Compile_lock; // a lock held when Compilation is updating code (used to block CodeCache traversal, CHA updates, etc)
102 extern Monitor* MethodCompileQueue_lock; // a lock held when method compilations are enqueued, dequeued
103 extern Monitor* CompileThread_lock; // a lock held by compile threads during compilation system initialization
104 extern Mutex* CompileTaskAlloc_lock; // a lock held when CompileTasks are allocated
105 extern Mutex* CompileStatistics_lock; // a lock held when updating compilation statistics
106 extern Mutex* MultiArray_lock; // a lock used to guard allocation of multi-dim arrays
107 extern Monitor* Terminator_lock; // a lock used to guard termination of the vm
108 extern Monitor* BeforeExit_lock; // a lock used to guard cleanups and shutdown hooks
109 extern Monitor* Notify_lock; // a lock used to synchronize the start-up of the vm
110 extern Monitor* Interrupt_lock; // a lock used for condition variable mediated interrupt processing
111 extern Monitor* ProfileVM_lock; // a lock used for profiling the VMThread
112 extern Mutex* ProfilePrint_lock; // a lock used to serialize the printing of profiles
113 extern Mutex* ExceptionCache_lock; // a lock used to synchronize exception cache updates
114 extern Mutex* OsrList_lock; // a lock used to serialize access to OSR queues
115
116 #ifndef PRODUCT
117 extern Mutex* FullGCALot_lock; // a lock to make FullGCALot MT safe
118 #endif // PRODUCT
119 extern Mutex* Debug1_lock; // A bunch of pre-allocated locks that can be used for tracing
120 extern Mutex* Debug2_lock; // down synchronization related bugs!
121 extern Mutex* Debug3_lock;
122
123 extern Mutex* RawMonitor_lock;
124 extern Mutex* PerfDataMemAlloc_lock; // a lock on the allocator for PerfData memory for performance data
125 extern Mutex* PerfDataManager_lock; // a long on access to PerfDataManager resources
126 extern Mutex* ParkerFreeList_lock;
127 extern Mutex* OopMapCacheAlloc_lock; // protects allocation of oop_map caches
128
129 extern Mutex* FreeList_lock; // protects the free region list during safepoints
130 extern Monitor* SecondaryFreeList_lock; // protects the secondary free region list
131 extern Mutex* OldSets_lock; // protects the old region sets
132 extern Monitor* RootRegionScan_lock; // used to notify that the CM threads have finished scanning the IM snapshot regions
133 extern Mutex* MMUTracker_lock; // protects the MMU
134 // tracker data structures
135 extern Mutex* HotCardCache_lock; // protects the hot card cache
136
137 extern Mutex* Management_lock; // a lock used to serialize JVM management
138 extern Monitor* Service_lock; // a lock used for service thread operation
139 extern Mutex* Stacktrace_lock; // used to guard access to the stacktrace table
140
141 extern Monitor* JfrQuery_lock; // protects JFR use
142 extern Monitor* JfrMsg_lock; // protects JFR messaging
143 extern Mutex* JfrBuffer_lock; // protects JFR buffer operations
144 extern Mutex* JfrStream_lock; // protects JFR stream access
145
146 // A MutexLocker provides mutual exclusion with respect to a given mutex
147 // for the scope which contains the locker. The lock is an OS lock, not
148 // an object lock, and the two do not interoperate. Do not use Mutex-based
149 // locks to lock on Java objects, because they will not be respected if a
150 // that object is locked using the Java locking mechanism.
151 //
152 // NOTE WELL!!
|