annotate src/share/vm/ci/ciObject.cpp @ 1478:5571b97fc1ec

More JNI global handle clean ups.
author Thomas Wuerthinger <wuerthinger@ssw.jku.at>
date Fri, 26 Nov 2010 19:45:05 +0100
parents 3483ec571caf
children 2d26b0046e0d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
2 * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
a61af66fc99e Initial load
duke
parents:
diff changeset
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
a61af66fc99e Initial load
duke
parents:
diff changeset
20 * CA 95054 USA or visit www.sun.com if you need additional information or
a61af66fc99e Initial load
duke
parents:
diff changeset
21 * have any questions.
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25 #include "incls/_precompiled.incl"
a61af66fc99e Initial load
duke
parents:
diff changeset
26 #include "incls/_ciObject.cpp.incl"
a61af66fc99e Initial load
duke
parents:
diff changeset
27
a61af66fc99e Initial load
duke
parents:
diff changeset
28 // ciObject
a61af66fc99e Initial load
duke
parents:
diff changeset
29 //
a61af66fc99e Initial load
duke
parents:
diff changeset
30 // This class represents an oop in the HotSpot virtual machine.
a61af66fc99e Initial load
duke
parents:
diff changeset
31 // Its subclasses are structured in a hierarchy which mirrors
a61af66fc99e Initial load
duke
parents:
diff changeset
32 // an aggregate of the VM's oop and klass hierarchies (see
a61af66fc99e Initial load
duke
parents:
diff changeset
33 // oopHierarchy.hpp). Each instance of ciObject holds a handle
a61af66fc99e Initial load
duke
parents:
diff changeset
34 // to a corresponding oop on the VM side and provides routines
a61af66fc99e Initial load
duke
parents:
diff changeset
35 // for accessing the information in its oop. By using the ciObject
a61af66fc99e Initial load
duke
parents:
diff changeset
36 // hierarchy for accessing oops in the VM, the compiler ensures
a61af66fc99e Initial load
duke
parents:
diff changeset
37 // that it is safe with respect to garbage collection; that is,
a61af66fc99e Initial load
duke
parents:
diff changeset
38 // GC and compilation can proceed independently without
a61af66fc99e Initial load
duke
parents:
diff changeset
39 // interference.
a61af66fc99e Initial load
duke
parents:
diff changeset
40 //
a61af66fc99e Initial load
duke
parents:
diff changeset
41 // Within the VM, the oop and klass hierarchies are separate.
a61af66fc99e Initial load
duke
parents:
diff changeset
42 // The compiler interface does not preserve this separation --
a61af66fc99e Initial load
duke
parents:
diff changeset
43 // the distinction between `klassOop' and `Klass' are not
a61af66fc99e Initial load
duke
parents:
diff changeset
44 // reflected in the interface and instead the Klass hierarchy
a61af66fc99e Initial load
duke
parents:
diff changeset
45 // is directly modeled as the subclasses of ciKlass.
a61af66fc99e Initial load
duke
parents:
diff changeset
46
a61af66fc99e Initial load
duke
parents:
diff changeset
47 // ------------------------------------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
48 // ciObject::ciObject
a61af66fc99e Initial load
duke
parents:
diff changeset
49 ciObject::ciObject(oop o) {
a61af66fc99e Initial load
duke
parents:
diff changeset
50 ASSERT_IN_VM;
1478
5571b97fc1ec More JNI global handle clean ups.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1422
diff changeset
51 if (ciObjectFactory::is_initialized()) {
5571b97fc1ec More JNI global handle clean ups.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1422
diff changeset
52 if (UseC1X) {
5571b97fc1ec More JNI global handle clean ups.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1422
diff changeset
53 _handle = JNIHandles::make_global(o);
5571b97fc1ec More JNI global handle clean ups.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1422
diff changeset
54 _temp_global = true;
5571b97fc1ec More JNI global handle clean ups.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1422
diff changeset
55 } else {
5571b97fc1ec More JNI global handle clean ups.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1422
diff changeset
56 _handle = JNIHandles::make_local(o);
5571b97fc1ec More JNI global handle clean ups.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1422
diff changeset
57 }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
58 } else {
a61af66fc99e Initial load
duke
parents:
diff changeset
59 _handle = JNIHandles::make_global(o);
a61af66fc99e Initial load
duke
parents:
diff changeset
60 }
a61af66fc99e Initial load
duke
parents:
diff changeset
61 _klass = NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
62 _ident = 0;
989
148e5441d916 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 0
diff changeset
63 init_flags_from(o);
1478
5571b97fc1ec More JNI global handle clean ups.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1422
diff changeset
64 _temp_global = false;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
65 }
a61af66fc99e Initial load
duke
parents:
diff changeset
66
a61af66fc99e Initial load
duke
parents:
diff changeset
67 // ------------------------------------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
68 // ciObject::ciObject
a61af66fc99e Initial load
duke
parents:
diff changeset
69 //
a61af66fc99e Initial load
duke
parents:
diff changeset
70 ciObject::ciObject(Handle h) {
a61af66fc99e Initial load
duke
parents:
diff changeset
71 ASSERT_IN_VM;
1478
5571b97fc1ec More JNI global handle clean ups.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1422
diff changeset
72 if (ciObjectFactory::is_initialized()) {
5571b97fc1ec More JNI global handle clean ups.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1422
diff changeset
73 if (UseC1X) {
5571b97fc1ec More JNI global handle clean ups.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1422
diff changeset
74 _handle = JNIHandles::make_global(h);
5571b97fc1ec More JNI global handle clean ups.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1422
diff changeset
75 _temp_global = true;
5571b97fc1ec More JNI global handle clean ups.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1422
diff changeset
76 } else {
5571b97fc1ec More JNI global handle clean ups.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1422
diff changeset
77 _handle = JNIHandles::make_local(h());
5571b97fc1ec More JNI global handle clean ups.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1422
diff changeset
78 }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
79 } else {
a61af66fc99e Initial load
duke
parents:
diff changeset
80 _handle = JNIHandles::make_global(h);
a61af66fc99e Initial load
duke
parents:
diff changeset
81 }
a61af66fc99e Initial load
duke
parents:
diff changeset
82 _klass = NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
83 _ident = 0;
989
148e5441d916 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 0
diff changeset
84 init_flags_from(h());
1478
5571b97fc1ec More JNI global handle clean ups.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1422
diff changeset
85 _temp_global = false;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
86 }
a61af66fc99e Initial load
duke
parents:
diff changeset
87
a61af66fc99e Initial load
duke
parents:
diff changeset
88 // ------------------------------------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
89 // ciObject::ciObject
a61af66fc99e Initial load
duke
parents:
diff changeset
90 //
a61af66fc99e Initial load
duke
parents:
diff changeset
91 // Unloaded klass/method variant. `klass' is the klass of the unloaded
a61af66fc99e Initial load
duke
parents:
diff changeset
92 // klass/method, if that makes sense.
a61af66fc99e Initial load
duke
parents:
diff changeset
93 ciObject::ciObject(ciKlass* klass) {
a61af66fc99e Initial load
duke
parents:
diff changeset
94 ASSERT_IN_VM;
a61af66fc99e Initial load
duke
parents:
diff changeset
95 assert(klass != NULL, "must supply klass");
a61af66fc99e Initial load
duke
parents:
diff changeset
96 _handle = NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
97 _klass = klass;
a61af66fc99e Initial load
duke
parents:
diff changeset
98 _ident = 0;
1478
5571b97fc1ec More JNI global handle clean ups.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1422
diff changeset
99 _temp_global = false;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
100 }
a61af66fc99e Initial load
duke
parents:
diff changeset
101
a61af66fc99e Initial load
duke
parents:
diff changeset
102 // ------------------------------------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
103 // ciObject::ciObject
a61af66fc99e Initial load
duke
parents:
diff changeset
104 //
a61af66fc99e Initial load
duke
parents:
diff changeset
105 // NULL variant. Used only by ciNullObject.
a61af66fc99e Initial load
duke
parents:
diff changeset
106 ciObject::ciObject() {
a61af66fc99e Initial load
duke
parents:
diff changeset
107 ASSERT_IN_VM;
a61af66fc99e Initial load
duke
parents:
diff changeset
108 _handle = NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
109 _klass = NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
110 _ident = 0;
1478
5571b97fc1ec More JNI global handle clean ups.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1422
diff changeset
111 _temp_global = false;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
112 }
a61af66fc99e Initial load
duke
parents:
diff changeset
113
a61af66fc99e Initial load
duke
parents:
diff changeset
114 // ------------------------------------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
115 // ciObject::klass
a61af66fc99e Initial load
duke
parents:
diff changeset
116 //
a61af66fc99e Initial load
duke
parents:
diff changeset
117 // Get the ciKlass of this ciObject.
a61af66fc99e Initial load
duke
parents:
diff changeset
118 ciKlass* ciObject::klass() {
a61af66fc99e Initial load
duke
parents:
diff changeset
119 if (_klass == NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
120 if (_handle == NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
121 // When both _klass and _handle are NULL, we are dealing
a61af66fc99e Initial load
duke
parents:
diff changeset
122 // with the distinguished instance of ciNullObject.
a61af66fc99e Initial load
duke
parents:
diff changeset
123 // No one should ask it for its klass.
a61af66fc99e Initial load
duke
parents:
diff changeset
124 assert(is_null_object(), "must be null object");
a61af66fc99e Initial load
duke
parents:
diff changeset
125 ShouldNotReachHere();
a61af66fc99e Initial load
duke
parents:
diff changeset
126 return NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
127 }
a61af66fc99e Initial load
duke
parents:
diff changeset
128
a61af66fc99e Initial load
duke
parents:
diff changeset
129 GUARDED_VM_ENTRY(
a61af66fc99e Initial load
duke
parents:
diff changeset
130 oop o = get_oop();
a61af66fc99e Initial load
duke
parents:
diff changeset
131 _klass = CURRENT_ENV->get_object(o->klass())->as_klass();
a61af66fc99e Initial load
duke
parents:
diff changeset
132 );
a61af66fc99e Initial load
duke
parents:
diff changeset
133 }
a61af66fc99e Initial load
duke
parents:
diff changeset
134 return _klass;
a61af66fc99e Initial load
duke
parents:
diff changeset
135 }
a61af66fc99e Initial load
duke
parents:
diff changeset
136
a61af66fc99e Initial load
duke
parents:
diff changeset
137 // ------------------------------------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
138 // ciObject::set_ident
a61af66fc99e Initial load
duke
parents:
diff changeset
139 //
a61af66fc99e Initial load
duke
parents:
diff changeset
140 // Set the unique identity number of a ciObject.
a61af66fc99e Initial load
duke
parents:
diff changeset
141 void ciObject::set_ident(uint id) {
a61af66fc99e Initial load
duke
parents:
diff changeset
142 assert((_ident >> FLAG_BITS) == 0, "must only initialize once");
a61af66fc99e Initial load
duke
parents:
diff changeset
143 assert( id < ((uint)1 << (BitsPerInt-FLAG_BITS)), "id too big");
a61af66fc99e Initial load
duke
parents:
diff changeset
144 _ident = _ident + (id << FLAG_BITS);
a61af66fc99e Initial load
duke
parents:
diff changeset
145 }
a61af66fc99e Initial load
duke
parents:
diff changeset
146
a61af66fc99e Initial load
duke
parents:
diff changeset
147 // ------------------------------------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
148 // ciObject::ident
a61af66fc99e Initial load
duke
parents:
diff changeset
149 //
a61af66fc99e Initial load
duke
parents:
diff changeset
150 // Report the unique identity number of a ciObject.
a61af66fc99e Initial load
duke
parents:
diff changeset
151 uint ciObject::ident() {
a61af66fc99e Initial load
duke
parents:
diff changeset
152 uint id = _ident >> FLAG_BITS;
a61af66fc99e Initial load
duke
parents:
diff changeset
153 assert(id != 0, "must be initialized");
a61af66fc99e Initial load
duke
parents:
diff changeset
154 return id;
a61af66fc99e Initial load
duke
parents:
diff changeset
155 }
a61af66fc99e Initial load
duke
parents:
diff changeset
156
a61af66fc99e Initial load
duke
parents:
diff changeset
157 // ------------------------------------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
158 // ciObject::equals
a61af66fc99e Initial load
duke
parents:
diff changeset
159 //
a61af66fc99e Initial load
duke
parents:
diff changeset
160 // Are two ciObjects equal?
a61af66fc99e Initial load
duke
parents:
diff changeset
161 bool ciObject::equals(ciObject* obj) {
a61af66fc99e Initial load
duke
parents:
diff changeset
162 return (this == obj);
a61af66fc99e Initial load
duke
parents:
diff changeset
163 }
a61af66fc99e Initial load
duke
parents:
diff changeset
164
a61af66fc99e Initial load
duke
parents:
diff changeset
165 // ------------------------------------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
166 // ciObject::hash
a61af66fc99e Initial load
duke
parents:
diff changeset
167 //
a61af66fc99e Initial load
duke
parents:
diff changeset
168 // A hash value for the convenience of compilers.
a61af66fc99e Initial load
duke
parents:
diff changeset
169 //
a61af66fc99e Initial load
duke
parents:
diff changeset
170 // Implementation note: we use the address of the ciObject as the
a61af66fc99e Initial load
duke
parents:
diff changeset
171 // basis for the hash. Use the _ident field, which is well-behaved.
a61af66fc99e Initial load
duke
parents:
diff changeset
172 int ciObject::hash() {
a61af66fc99e Initial load
duke
parents:
diff changeset
173 return ident() * 31;
a61af66fc99e Initial load
duke
parents:
diff changeset
174 }
a61af66fc99e Initial load
duke
parents:
diff changeset
175
a61af66fc99e Initial load
duke
parents:
diff changeset
176 // ------------------------------------------------------------------
989
148e5441d916 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 0
diff changeset
177 // ciObject::constant_encoding
0
a61af66fc99e Initial load
duke
parents:
diff changeset
178 //
a61af66fc99e Initial load
duke
parents:
diff changeset
179 // The address which the compiler should embed into the
a61af66fc99e Initial load
duke
parents:
diff changeset
180 // generated code to represent this oop. This address
a61af66fc99e Initial load
duke
parents:
diff changeset
181 // is not the true address of the oop -- it will get patched
a61af66fc99e Initial load
duke
parents:
diff changeset
182 // during nmethod creation.
a61af66fc99e Initial load
duke
parents:
diff changeset
183 //
a61af66fc99e Initial load
duke
parents:
diff changeset
184 //
a61af66fc99e Initial load
duke
parents:
diff changeset
185 //
a61af66fc99e Initial load
duke
parents:
diff changeset
186 // Implementation note: we use the handle as the encoding. The
a61af66fc99e Initial load
duke
parents:
diff changeset
187 // nmethod constructor resolves the handle and patches in the oop.
a61af66fc99e Initial load
duke
parents:
diff changeset
188 //
a61af66fc99e Initial load
duke
parents:
diff changeset
189 // This method should be changed to return an generified address
a61af66fc99e Initial load
duke
parents:
diff changeset
190 // to discourage use of the JNI handle.
989
148e5441d916 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 0
diff changeset
191 jobject ciObject::constant_encoding() {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
192 assert(is_null_object() || handle() != NULL, "cannot embed null pointer");
989
148e5441d916 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 0
diff changeset
193 assert(can_be_constant(), "oop must be NULL or perm");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
194 return handle();
a61af66fc99e Initial load
duke
parents:
diff changeset
195 }
a61af66fc99e Initial load
duke
parents:
diff changeset
196
a61af66fc99e Initial load
duke
parents:
diff changeset
197 // ------------------------------------------------------------------
989
148e5441d916 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 0
diff changeset
198 // ciObject::can_be_constant
148e5441d916 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 0
diff changeset
199 bool ciObject::can_be_constant() {
148e5441d916 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 0
diff changeset
200 if (ScavengeRootsInCode >= 1) return true; // now everybody can encode as a constant
148e5441d916 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 0
diff changeset
201 return handle() == NULL || !is_scavengable();
148e5441d916 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 0
diff changeset
202 }
148e5441d916 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 0
diff changeset
203
148e5441d916 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 0
diff changeset
204 // ------------------------------------------------------------------
148e5441d916 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 0
diff changeset
205 // ciObject::should_be_constant()
148e5441d916 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 0
diff changeset
206 bool ciObject::should_be_constant() {
148e5441d916 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 0
diff changeset
207 if (ScavengeRootsInCode >= 2) return true; // force everybody to be a constant
148e5441d916 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 0
diff changeset
208 return handle() == NULL || !is_scavengable();
0
a61af66fc99e Initial load
duke
parents:
diff changeset
209 }
a61af66fc99e Initial load
duke
parents:
diff changeset
210
a61af66fc99e Initial load
duke
parents:
diff changeset
211
a61af66fc99e Initial load
duke
parents:
diff changeset
212 // ------------------------------------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
213 // ciObject::print
a61af66fc99e Initial load
duke
parents:
diff changeset
214 //
a61af66fc99e Initial load
duke
parents:
diff changeset
215 // Print debugging output about this ciObject.
a61af66fc99e Initial load
duke
parents:
diff changeset
216 //
a61af66fc99e Initial load
duke
parents:
diff changeset
217 // Implementation note: dispatch to the virtual print_impl behavior
a61af66fc99e Initial load
duke
parents:
diff changeset
218 // for this ciObject.
a61af66fc99e Initial load
duke
parents:
diff changeset
219 void ciObject::print(outputStream* st) {
a61af66fc99e Initial load
duke
parents:
diff changeset
220 st->print("<%s", type_string());
a61af66fc99e Initial load
duke
parents:
diff changeset
221 GUARDED_VM_ENTRY(print_impl(st);)
989
148e5441d916 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 0
diff changeset
222 st->print(" ident=%d %s%s address=0x%x>", ident(),
0
a61af66fc99e Initial load
duke
parents:
diff changeset
223 is_perm() ? "PERM" : "",
989
148e5441d916 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 0
diff changeset
224 is_scavengable() ? "SCAVENGABLE" : "",
0
a61af66fc99e Initial load
duke
parents:
diff changeset
225 (address)this);
a61af66fc99e Initial load
duke
parents:
diff changeset
226 }
a61af66fc99e Initial load
duke
parents:
diff changeset
227
a61af66fc99e Initial load
duke
parents:
diff changeset
228 // ------------------------------------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
229 // ciObject::print_oop
a61af66fc99e Initial load
duke
parents:
diff changeset
230 //
a61af66fc99e Initial load
duke
parents:
diff changeset
231 // Print debugging output about the oop this ciObject represents.
a61af66fc99e Initial load
duke
parents:
diff changeset
232 void ciObject::print_oop(outputStream* st) {
a61af66fc99e Initial load
duke
parents:
diff changeset
233 if (is_null_object()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
234 st->print_cr("NULL");
a61af66fc99e Initial load
duke
parents:
diff changeset
235 } else if (!is_loaded()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
236 st->print_cr("UNLOADED");
a61af66fc99e Initial load
duke
parents:
diff changeset
237 } else {
a61af66fc99e Initial load
duke
parents:
diff changeset
238 GUARDED_VM_ENTRY(get_oop()->print_on(st);)
a61af66fc99e Initial load
duke
parents:
diff changeset
239 }
a61af66fc99e Initial load
duke
parents:
diff changeset
240 }