comparison src/share/vm/runtime/vframe.cpp @ 18041:52b4284cb496

Merge with jdk8u20-b26
author Gilles Duboscq <duboscq@ssw.jku.at>
date Wed, 15 Oct 2014 16:02:50 +0200
parents 89152779163c 4a1062dc52d1
children 1deff4ac56c3
comparison
equal deleted inserted replaced
17606:45d7b2c7029d 18041:52b4284cb496
1 /* 1 /*
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2014, 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.
44 #include "runtime/synchronizer.hpp" 44 #include "runtime/synchronizer.hpp"
45 #include "runtime/vframe.hpp" 45 #include "runtime/vframe.hpp"
46 #include "runtime/vframeArray.hpp" 46 #include "runtime/vframeArray.hpp"
47 #include "runtime/vframe_hp.hpp" 47 #include "runtime/vframe_hp.hpp"
48 48
49 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
50
49 vframe::vframe(const frame* fr, const RegisterMap* reg_map, JavaThread* thread) 51 vframe::vframe(const frame* fr, const RegisterMap* reg_map, JavaThread* thread)
50 : _reg_map(reg_map), _thread(thread) { 52 : _reg_map(reg_map), _thread(thread) {
51 assert(fr != NULL, "must have frame"); 53 assert(fr != NULL, "must have frame");
52 _fr = *fr; 54 _fr = *fr;
53 } 55 }
195 } 197 }
196 } 198 }
197 continue; 199 continue;
198 } 200 }
199 if (monitor->owner() != NULL) { 201 if (monitor->owner() != NULL) {
202 // the monitor is associated with an object, i.e., it is locked
200 203
201 // First, assume we have the monitor locked. If we haven't found an 204 // First, assume we have the monitor locked. If we haven't found an
202 // owned monitor before and this is the first frame, then we need to 205 // owned monitor before and this is the first frame, then we need to
203 // see if we have completed the lock or we are blocked trying to 206 // see if we have completed the lock or we are blocked trying to
204 // acquire it - we can only be blocked if the monitor is inflated 207 // acquire it - we can only be blocked if the monitor is inflated
205 208
206 const char *lock_state = "locked"; // assume we have the monitor locked 209 const char *lock_state = "locked"; // assume we have the monitor locked
207 if (!found_first_monitor && frame_count == 0) { 210 if (!found_first_monitor && frame_count == 0) {
208 markOop mark = monitor->owner()->mark(); 211 markOop mark = monitor->owner()->mark();
209 if (mark->has_monitor() && 212 if (mark->has_monitor() &&
210 mark->monitor() == thread()->current_pending_monitor()) { 213 ( // we have marked ourself as pending on this monitor
214 mark->monitor() == thread()->current_pending_monitor() ||
215 // we are not the owner of this monitor
216 !mark->monitor()->is_entered(thread())
217 )) {
211 lock_state = "waiting to lock"; 218 lock_state = "waiting to lock";
212 } 219 }
213 } 220 }
214 221
215 found_first_monitor = true; 222 found_first_monitor = true;