src/share/vm/runtime/mutexLocker.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6766644 Sdiff src/share/vm/runtime

src/share/vm/runtime/mutexLocker.hpp

Print this page
rev 2029 : 6766644: Redefinition of compiled method fails with assertion "Can not load classes with the Compiler thread"
Summary: Defer posting events from the compiler thread -- use service thread
Reviewed-by:
* * *
   1 /*
   2  * Copyright (c) 1997, 2010, 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  *


 113 extern Mutex*   OsrList_lock;                    // a lock used to serialize access to OSR queues
 114 
 115 #ifndef PRODUCT
 116 extern Mutex*   FullGCALot_lock;                 // a lock to make FullGCALot MT safe
 117 #endif
 118 extern Mutex*   Debug1_lock;                     // A bunch of pre-allocated locks that can be used for tracing
 119 extern Mutex*   Debug2_lock;                     // down synchronization related bugs!
 120 extern Mutex*   Debug3_lock;
 121 
 122 extern Mutex*   RawMonitor_lock;
 123 extern Mutex*   PerfDataMemAlloc_lock;           // a lock on the allocator for PerfData memory for performance data
 124 extern Mutex*   PerfDataManager_lock;            // a long on access to PerfDataManager resources
 125 extern Mutex*   ParkerFreeList_lock;
 126 extern Mutex*   OopMapCacheAlloc_lock;           // protects allocation of oop_map caches
 127 
 128 extern Mutex*   MMUTracker_lock;                 // protects the MMU
 129                                                  // tracker data structures
 130 extern Mutex*   HotCardCache_lock;               // protects the hot card cache
 131 
 132 extern Mutex*   Management_lock;                 // a lock used to serialize JVM management
 133 extern Monitor* LowMemory_lock;                  // a lock used for low memory detection
 134 
 135 // A MutexLocker provides mutual exclusion with respect to a given mutex
 136 // for the scope which contains the locker.  The lock is an OS lock, not
 137 // an object lock, and the two do not interoperate.  Do not use Mutex-based
 138 // locks to lock on Java objects, because they will not be respected if a
 139 // that object is locked using the Java locking mechanism.
 140 //
 141 //                NOTE WELL!!
 142 //
 143 // See orderAccess.hpp.  We assume throughout the VM that MutexLocker's
 144 // and friends constructors do a fence, a lock and an acquire *in that
 145 // order*.  And that their destructors do a release and unlock, in *that*
 146 // order.  If their implementations change such that these assumptions
 147 // are violated, a whole lot of code will break.
 148 
 149 // Print all mutexes/monitors that are currently owned by a thread; called
 150 // by fatal error handler.
 151 void print_owned_locks_on_error(outputStream* st);
 152 
 153 char *lock_name(Mutex *mutex);


   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  *


 113 extern Mutex*   OsrList_lock;                    // a lock used to serialize access to OSR queues
 114 
 115 #ifndef PRODUCT
 116 extern Mutex*   FullGCALot_lock;                 // a lock to make FullGCALot MT safe
 117 #endif
 118 extern Mutex*   Debug1_lock;                     // A bunch of pre-allocated locks that can be used for tracing
 119 extern Mutex*   Debug2_lock;                     // down synchronization related bugs!
 120 extern Mutex*   Debug3_lock;
 121 
 122 extern Mutex*   RawMonitor_lock;
 123 extern Mutex*   PerfDataMemAlloc_lock;           // a lock on the allocator for PerfData memory for performance data
 124 extern Mutex*   PerfDataManager_lock;            // a long on access to PerfDataManager resources
 125 extern Mutex*   ParkerFreeList_lock;
 126 extern Mutex*   OopMapCacheAlloc_lock;           // protects allocation of oop_map caches
 127 
 128 extern Mutex*   MMUTracker_lock;                 // protects the MMU
 129                                                  // tracker data structures
 130 extern Mutex*   HotCardCache_lock;               // protects the hot card cache
 131 
 132 extern Mutex*   Management_lock;                 // a lock used to serialize JVM management
 133 extern Monitor* Service_lock;                    // a lock used for service thread operation
 134 
 135 // A MutexLocker provides mutual exclusion with respect to a given mutex
 136 // for the scope which contains the locker.  The lock is an OS lock, not
 137 // an object lock, and the two do not interoperate.  Do not use Mutex-based
 138 // locks to lock on Java objects, because they will not be respected if a
 139 // that object is locked using the Java locking mechanism.
 140 //
 141 //                NOTE WELL!!
 142 //
 143 // See orderAccess.hpp.  We assume throughout the VM that MutexLocker's
 144 // and friends constructors do a fence, a lock and an acquire *in that
 145 // order*.  And that their destructors do a release and unlock, in *that*
 146 // order.  If their implementations change such that these assumptions
 147 // are violated, a whole lot of code will break.
 148 
 149 // Print all mutexes/monitors that are currently owned by a thread; called
 150 // by fatal error handler.
 151 void print_owned_locks_on_error(outputStream* st);
 152 
 153 char *lock_name(Mutex *mutex);


src/share/vm/runtime/mutexLocker.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File