< prev index next >

src/hotspot/share/oops/oop.cpp

Print this page

        

*** 37,47 **** #include "utilities/copy.hpp" bool always_do_update_barrier = false; void oopDesc::print_on(outputStream* st) const { ! klass()->oop_print_on(oop(this), st); } void oopDesc::print_address_on(outputStream* st) const { st->print("{" INTPTR_FORMAT "}", p2i(this)); --- 37,55 ---- #include "utilities/copy.hpp" bool always_do_update_barrier = false; void oopDesc::print_on(outputStream* st) const { ! if (this == NULL) { ! st->print_cr("NULL"); ! } else if (*((juint*)this) == badHeapWordVal) { ! st->print("BAD WORD"); ! } else if (*((juint*)this) == badMetaWordVal) { ! st->print("BAD META WORD"); ! } else { ! klass()->oop_print_on(oop(this), st); ! } } void oopDesc::print_address_on(outputStream* st) const { st->print("{" INTPTR_FORMAT "}", p2i(this));
*** 67,82 **** print_value_on(&st); return st.as_string(); } void oopDesc::print_value_on(outputStream* st) const { ! oop obj = oop(this); ! if (java_lang_String::is_instance(obj)) { ! java_lang_String::print(obj, st); ! print_address_on(st); } else { ! klass()->oop_print_value_on(obj, st); } } void oopDesc::verify_on(outputStream* st, oopDesc* oop_desc) { --- 75,94 ---- print_value_on(&st); return st.as_string(); } void oopDesc::print_value_on(outputStream* st) const { ! if (this == NULL) { ! st->print("NULL"); } else { ! oop obj = oop(this); ! if (java_lang_String::is_instance(obj)) { ! java_lang_String::print(obj, st); ! print_address_on(st); ! } else { ! klass()->oop_print_value_on(obj, st); ! } } } void oopDesc::verify_on(outputStream* st, oopDesc* oop_desc) {
< prev index next >