comparison src/share/vm/runtime/basicLock.cpp @ 22833:6e8e0bf87bbe

8069412: Locks need better debug-printing support Summary: Added better debug-printing support and enhanced LogCompilation tool Reviewed-by: kvn, roland, dholmes
author drchase
date Fri, 20 Feb 2015 22:12:53 -0500
parents f95d63e2154a
children
comparison
equal deleted inserted replaced
22832:9d6eb2757167 22833:6e8e0bf87bbe
1 /* 1 /*
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 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 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
26 #include "runtime/basicLock.hpp" 26 #include "runtime/basicLock.hpp"
27 #include "runtime/synchronizer.hpp" 27 #include "runtime/synchronizer.hpp"
28 28
29 void BasicLock::print_on(outputStream* st) const { 29 void BasicLock::print_on(outputStream* st) const {
30 st->print("monitor"); 30 st->print("monitor");
31 markOop moop = displaced_header();
32 if (moop != NULL)
33 moop->print_on(st);
31 } 34 }
32 35
33 void BasicLock::move_to(oop obj, BasicLock* dest) { 36 void BasicLock::move_to(oop obj, BasicLock* dest) {
34 // Check to see if we need to inflate the lock. This is only needed 37 // Check to see if we need to inflate the lock. This is only needed
35 // if an object is locked using "this" lightweight monitor. In that 38 // if an object is locked using "this" lightweight monitor. In that