< prev index next >

src/share/vm/runtime/vframe.cpp

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -187,10 +187,11 @@
     for (int index = (mons->length()-1); index >= 0; index--) {
       MonitorInfo* monitor = mons->at(index);
       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 {
           oop obj = monitor->owner();
           if (obj != NULL) {
             print_locked_object_class_name(st, obj, "eliminated");

@@ -214,16 +215,23 @@
                 mark->monitor() == thread()->current_pending_monitor() ||
                 // we are not the owner of this monitor
                 !mark->monitor()->is_entered(thread())
               )) {
             lock_state = "waiting to lock";
+            print_locked_object_class_name(st, monitor->owner(), lock_state);
+            if (Verbose) {
+                // match with format above, replacing "-" with " ".
+                st->print("\t  lockbits="); mark->print_on(st); st->print_cr("");
           }
+          } else {
+            print_locked_object_class_name(st, monitor->owner(), lock_state);
         }
-
-        found_first_monitor = true;
+        } else {
         print_locked_object_class_name(st, monitor->owner(), lock_state);
       }
+        found_first_monitor = true;
+      }
     }
   }
 }
 
 // ------------- interpretedVFrame --------------

@@ -575,14 +583,17 @@
       tty->print("( is scalar replaced %s)", k->external_name());
     } else if (monitor->owner() == NULL) {
       tty->print("( null )");
     } else {
       monitor->owner()->print_value();
-      tty->print("(" INTPTR_FORMAT ")", (address)monitor->owner());
+      tty->print("(owner=" INTPTR_FORMAT ")", (address)monitor->owner());
     }
-    if (monitor->eliminated() && is_compiled_frame())
-      tty->print(" ( lock is eliminated )");
+    if (monitor->eliminated())
+        if(is_compiled_frame())
+            tty->print(" ( lock is eliminated in compiled frame )");
+        else
+            tty->print(" ( lock is eliminated, frame not compiled )");
     tty->cr();
     tty->print("\t  ");
     monitor->lock()->print_on(tty);
     tty->cr();
   }
< prev index next >