--- a/src/hotspot/share/runtime/vframe.cpp Tue Jan 15 15:56:41 2019 -0500
+++ b/src/hotspot/share/runtime/vframe.cpp Tue Jan 15 16:40:31 2019 -0500
@@ -190,6 +190,14 @@
Klass* k = obj->klass();
st->print_cr("\t- %s <" INTPTR_FORMAT "> (a %s)", "parking to wait for ", p2i(obj), k->external_name());
}
+ else if (thread()->osthread()->get_state() == OBJECT_WAIT) {
+ // We are waiting on an Object monitor but Object.wait() isn't the
+ // top-frame, so we should be waiting on a Class initialization monitor.
+ InstanceKlass* k = thread()->class_to_be_initialized();
+ if (k != NULL) {
+ st->print_cr("\t- waiting on the Class initialization monitor for %s", k->external_name());
+ }
+ }
}
// Print out all monitors that we have locked, or are trying to lock,