--- a/src/hotspot/share/runtime/vframe.cpp Thu Oct 17 20:27:44 2019 +0100
+++ b/src/hotspot/share/runtime/vframe.cpp Thu Oct 17 20:53:35 2019 +0100
@@ -135,7 +135,7 @@
//
// Skip the monitor that the thread is blocked to enter or waiting on
//
- if (!found_first_monitor && (oopDesc::equals(obj, pending_obj) || oopDesc::equals(obj, waiting_obj))) {
+ if (!found_first_monitor && (obj == pending_obj || obj == waiting_obj)) {
continue;
}
found_first_monitor = true;
@@ -211,7 +211,6 @@
if (monitor->eliminated() && is_compiled_frame()) { // Eliminated in compiled code
if (monitor->owner_is_scalar_replaced()) {
Klass* k = java_lang_Class::as_Klass(monitor->owner_klass());
- // format below for lockbits matches this one.
st->print("\t- eliminated <owner is scalar replaced> (a %s)", k->external_name());
} else {
Handle obj(THREAD, monitor->owner());
@@ -224,7 +223,6 @@
if (monitor->owner() != NULL) {
// the monitor is associated with an object, i.e., it is locked
- markOop mark = NULL;
const char *lock_state = "locked"; // assume we have the monitor locked
if (!found_first_monitor && frame_count == 0) {
// If this is the first frame and we haven't found an owned
@@ -232,18 +230,14 @@
// the lock or if we are blocked trying to acquire it. Only
// an inflated monitor that is first on the monitor list in
// the first frame can block us on a monitor enter.
- mark = monitor->owner()->mark();
- if (mark->has_monitor() &&
+ markWord mark = monitor->owner()->mark();
+ if (mark.has_monitor() &&
( // we have marked ourself as pending on this monitor
- mark->monitor() == thread()->current_pending_monitor() ||
+ mark.monitor() == thread()->current_pending_monitor() ||
// we are not the owner of this monitor
- !mark->monitor()->is_entered(thread())
+ !mark.monitor()->is_entered(thread())
)) {
lock_state = "waiting to lock";
- } else {
- // We own the monitor which is not as interesting so
- // disable the extra printing below.
- mark = NULL;
}
}
print_locked_object_class_name(st, Handle(THREAD, monitor->owner()), lock_state);