< prev index next >

src/share/vm/runtime/vframe.cpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2014, 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. --- 1,7 ---- /* ! * 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,196 **** --- 187,197 ---- 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");
*** 204,228 **** // First, assume we have the monitor locked. If we haven't found an // owned monitor before and this is the first frame, then we need to // see if we have completed the lock or we are blocked trying to // acquire it - we can only be blocked if the monitor is inflated const char *lock_state = "locked"; // assume we have the monitor locked if (!found_first_monitor && frame_count == 0) { ! markOop mark = monitor->owner()->mark(); if (mark->has_monitor() && ( // we have marked ourself as pending on this monitor mark->monitor() == thread()->current_pending_monitor() || // we are not the owner of this monitor !mark->monitor()->is_entered(thread()) )) { lock_state = "waiting to lock"; } } found_first_monitor = true; - print_locked_object_class_name(st, monitor->owner(), lock_state); } } } } --- 205,238 ---- // First, assume we have the monitor locked. If we haven't found an // owned monitor before and this is the first frame, then we need to // see if we have completed the lock or we are blocked trying to // acquire it - we can only be blocked if the monitor is inflated + markOop mark = NULL; const char *lock_state = "locked"; // assume we have the monitor locked if (!found_first_monitor && frame_count == 0) { ! mark = monitor->owner()->mark(); if (mark->has_monitor() && ( // we have marked ourself as pending on this monitor mark->monitor() == thread()->current_pending_monitor() || // we are not the owner of this monitor !mark->monitor()->is_entered(thread()) )) { lock_state = "waiting to lock"; + } else { + mark = NULL; // Disable printing below + } } + print_locked_object_class_name(st, monitor->owner(), lock_state); + if (Verbose && mark != NULL) { + // match with format above, replacing "-" with " ". + st->print("\t lockbits="); + mark->print_on(st); + st->cr(); } found_first_monitor = true; } } } }
*** 575,588 **** 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()); } - if (monitor->eliminated() && is_compiled_frame()) - tty->print(" ( lock is eliminated )"); tty->cr(); tty->print("\t "); monitor->lock()->print_on(tty); tty->cr(); } --- 585,603 ---- tty->print("( is scalar replaced %s)", k->external_name()); } else if (monitor->owner() == NULL) { tty->print("( null )"); } else { monitor->owner()->print_value(); ! tty->print("(owner=" INTPTR_FORMAT ")", (address)monitor->owner()); ! } ! 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 >