equal
deleted
inserted
replaced
27 |
27 |
28 bool always_do_update_barrier = false; |
28 bool always_do_update_barrier = false; |
29 |
29 |
30 BarrierSet* oopDesc::_bs = NULL; |
30 BarrierSet* oopDesc::_bs = NULL; |
31 |
31 |
32 #ifdef PRODUCT |
|
33 void oopDesc::print_on(outputStream* st) const {} |
|
34 void oopDesc::print_address_on(outputStream* st) const {} |
|
35 char* oopDesc::print_string() { return NULL; } |
|
36 void oopDesc::print() {} |
|
37 void oopDesc::print_address() {} |
|
38 |
|
39 #else //PRODUCT |
|
40 |
|
41 void oopDesc::print_on(outputStream* st) const { |
32 void oopDesc::print_on(outputStream* st) const { |
42 if (this == NULL) { |
33 if (this == NULL) { |
43 st->print_cr("NULL"); |
34 st->print_cr("NULL"); |
44 } else { |
35 } else { |
45 blueprint()->oop_print_on(oop(this), st); |
36 blueprint()->oop_print_on(oop(this), st); |
60 stringStream st; |
51 stringStream st; |
61 print_on(&st); |
52 print_on(&st); |
62 return st.as_string(); |
53 return st.as_string(); |
63 } |
54 } |
64 |
55 |
65 #endif // PRODUCT |
|
66 |
|
67 // The print_value functions are present in all builds, to support the disassembler. |
|
68 |
|
69 void oopDesc::print_value() { |
56 void oopDesc::print_value() { |
70 print_value_on(tty); |
57 print_value_on(tty); |
71 } |
58 } |
72 |
59 |
73 char* oopDesc::print_value_string() { |
60 char* oopDesc::print_value_string() { |
81 oop obj = oop(this); |
68 oop obj = oop(this); |
82 if (this == NULL) { |
69 if (this == NULL) { |
83 st->print("NULL"); |
70 st->print("NULL"); |
84 } else if (java_lang_String::is_instance(obj)) { |
71 } else if (java_lang_String::is_instance(obj)) { |
85 java_lang_String::print(obj, st); |
72 java_lang_String::print(obj, st); |
86 #ifndef PRODUCT |
|
87 if (PrintOopAddress) print_address_on(st); |
73 if (PrintOopAddress) print_address_on(st); |
88 #endif //PRODUCT |
|
89 #ifdef ASSERT |
74 #ifdef ASSERT |
90 } else if (!Universe::heap()->is_in(obj) || !Universe::heap()->is_in(klass())) { |
75 } else if (!Universe::heap()->is_in(obj) || !Universe::heap()->is_in(klass())) { |
91 st->print("### BAD OOP %p ###", (address)obj); |
76 st->print("### BAD OOP %p ###", (address)obj); |
92 #endif //ASSERT |
77 #endif //ASSERT |
93 } else { |
78 } else { |