< prev index next >

src/hotspot/share/runtime/biasedLocking.cpp

Print this page




  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  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "logging/log.hpp"
  27 #include "memory/resourceArea.hpp"
  28 #include "oops/klass.inline.hpp"
  29 #include "oops/markOop.hpp"
  30 #include "oops/oop.inline.hpp"
  31 #include "runtime/atomic.hpp"
  32 #include "runtime/basicLock.hpp"
  33 #include "runtime/biasedLocking.hpp"

  34 #include "runtime/task.hpp"
  35 #include "runtime/threadSMR.hpp"
  36 #include "runtime/vframe.hpp"
  37 #include "runtime/vmThread.hpp"
  38 #include "runtime/vm_operations.hpp"
  39 #include "trace/tracing.hpp"
  40 
  41 static bool _biased_locking_enabled = false;
  42 BiasedLockingCounters BiasedLocking::_counters;
  43 
  44 static GrowableArray<Handle>*  _preserved_oop_stack  = NULL;
  45 static GrowableArray<markOop>* _preserved_mark_stack = NULL;
  46 
  47 static void enable_biased_locking(InstanceKlass* k) {
  48   k->set_prototype_header(markOopDesc::biased_locking_prototype());
  49 }
  50 
  51 class VM_EnableBiasedLocking: public VM_Operation {
  52  private:
  53   bool _is_cheap_allocated;




  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  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "logging/log.hpp"
  27 #include "memory/resourceArea.hpp"
  28 #include "oops/klass.inline.hpp"
  29 #include "oops/markOop.hpp"
  30 #include "oops/oop.inline.hpp"
  31 #include "runtime/atomic.hpp"
  32 #include "runtime/basicLock.hpp"
  33 #include "runtime/biasedLocking.hpp"
  34 #include "runtime/handles.inline.hpp"
  35 #include "runtime/task.hpp"
  36 #include "runtime/threadSMR.hpp"
  37 #include "runtime/vframe.hpp"
  38 #include "runtime/vmThread.hpp"
  39 #include "runtime/vm_operations.hpp"
  40 #include "trace/tracing.hpp"
  41 
  42 static bool _biased_locking_enabled = false;
  43 BiasedLockingCounters BiasedLocking::_counters;
  44 
  45 static GrowableArray<Handle>*  _preserved_oop_stack  = NULL;
  46 static GrowableArray<markOop>* _preserved_mark_stack = NULL;
  47 
  48 static void enable_biased_locking(InstanceKlass* k) {
  49   k->set_prototype_header(markOopDesc::biased_locking_prototype());
  50 }
  51 
  52 class VM_EnableBiasedLocking: public VM_Operation {
  53  private:
  54   bool _is_cheap_allocated;


< prev index next >