src/hotspot/share/runtime/objectMonitor.cpp
changeset 54725 bfa52d3068f5
parent 54609 04857e2cd509
child 54807 33fe50b6d707
--- a/src/hotspot/share/runtime/objectMonitor.cpp	Mon May 06 21:50:20 2019 +0200
+++ b/src/hotspot/share/runtime/objectMonitor.cpp	Mon May 06 15:25:57 2019 -0400
@@ -1926,3 +1926,11 @@
 
   DEBUG_ONLY(InitDone = true;)
 }
+
+void ObjectMonitor::print_on(outputStream* st) const {
+  // The minimal things to print for markOop printing, more can be added for debugging and logging.
+  st->print("{contentions=0x%08x,waiters=0x%08x"
+            ",recursions=" INTPTR_FORMAT ",owner=" INTPTR_FORMAT "}",
+            contentions(), waiters(), recursions(),
+            p2i(owner()));
+}