Mercurial > hg > truffle
annotate src/share/vm/ci/ciObjectFactory.cpp @ 6653:2d5407ae1ac4
intermediate materialization is now removed during lowering of an InstanceOfNode that has a single usage which is an IfNode in the same block
lowered InstanceOfNode snippet graph is shared among similar usages of the InstanceOfNode
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 30 Oct 2012 23:58:53 +0100 |
parents | 957c266d8bc5 |
children | e522a00b91aa |
rev | line source |
---|---|
0 | 1 /* |
2357
8033953d67ff
7012648: move JSR 292 to package java.lang.invoke and adjust names
jrose
parents:
2177
diff
changeset
|
2 * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. |
0 | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1507
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1507
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1507
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
1972 | 25 #include "precompiled.hpp" |
26 #include "ci/ciCPCache.hpp" | |
27 #include "ci/ciCallSite.hpp" | |
28 #include "ci/ciInstance.hpp" | |
29 #include "ci/ciInstanceKlass.hpp" | |
30 #include "ci/ciInstanceKlassKlass.hpp" | |
6266
1d7922586cf6
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
6197
diff
changeset
|
31 #include "ci/ciMemberName.hpp" |
1972 | 32 #include "ci/ciMethod.hpp" |
33 #include "ci/ciMethodData.hpp" | |
34 #include "ci/ciMethodHandle.hpp" | |
35 #include "ci/ciMethodKlass.hpp" | |
36 #include "ci/ciNullObject.hpp" | |
37 #include "ci/ciObjArray.hpp" | |
38 #include "ci/ciObjArrayKlass.hpp" | |
39 #include "ci/ciObjArrayKlassKlass.hpp" | |
40 #include "ci/ciObjectFactory.hpp" | |
41 #include "ci/ciSymbol.hpp" | |
42 #include "ci/ciTypeArray.hpp" | |
43 #include "ci/ciTypeArrayKlass.hpp" | |
44 #include "ci/ciTypeArrayKlassKlass.hpp" | |
45 #include "ci/ciUtilities.hpp" | |
46 #include "classfile/systemDictionary.hpp" | |
47 #include "gc_interface/collectedHeap.inline.hpp" | |
48 #include "memory/allocation.inline.hpp" | |
49 #include "oops/oop.inline.hpp" | |
50 #include "oops/oop.inline2.hpp" | |
51 #include "runtime/fieldType.hpp" | |
0 | 52 |
53 // ciObjectFactory | |
54 // | |
55 // This class handles requests for the creation of new instances | |
56 // of ciObject and its subclasses. It contains a caching mechanism | |
57 // which ensures that for each oop, at most one ciObject is created. | |
58 // This invariant allows more efficient implementation of ciObject. | |
59 // | |
60 // Implementation note: the oop->ciObject mapping is represented as | |
61 // a table stored in an array. Even though objects are moved | |
62 // by the garbage collector, the compactor preserves their relative | |
63 // order; address comparison of oops (in perm space) is safe so long | |
64 // as we prohibit GC during our comparisons. We currently use binary | |
65 // search to find the oop in the table, and inserting a new oop | |
66 // into the table may be costly. If this cost ends up being | |
67 // problematic the underlying data structure can be switched to some | |
68 // sort of balanced binary tree. | |
69 | |
70 GrowableArray<ciObject*>* ciObjectFactory::_shared_ci_objects = NULL; | |
71 ciSymbol* ciObjectFactory::_shared_ci_symbols[vmSymbols::SID_LIMIT]; | |
72 int ciObjectFactory::_shared_ident_limit = 0; | |
73 volatile bool ciObjectFactory::_initialized = false; | |
74 | |
75 | |
76 // ------------------------------------------------------------------ | |
77 // ciObjectFactory::ciObjectFactory | |
78 ciObjectFactory::ciObjectFactory(Arena* arena, | |
79 int expected_size) { | |
80 | |
81 for (int i = 0; i < NON_PERM_BUCKETS; i++) { | |
82 _non_perm_bucket[i] = NULL; | |
83 } | |
84 _non_perm_count = 0; | |
85 | |
86 _next_ident = _shared_ident_limit; | |
87 _arena = arena; | |
88 _ci_objects = new (arena) GrowableArray<ciObject*>(arena, expected_size, 0, NULL); | |
89 | |
90 // If the shared ci objects exist append them to this factory's objects | |
4977
532be189cf09
Reducing diff to hsx24
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4137
diff
changeset
|
91 #ifndef GRAAL |
0 | 92 if (_shared_ci_objects != NULL) { |
93 _ci_objects->appendAll(_shared_ci_objects); | |
94 } | |
4977
532be189cf09
Reducing diff to hsx24
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4137
diff
changeset
|
95 #endif |
0 | 96 |
97 _unloaded_methods = new (arena) GrowableArray<ciMethod*>(arena, 4, 0, NULL); | |
98 _unloaded_klasses = new (arena) GrowableArray<ciKlass*>(arena, 8, 0, NULL); | |
1602 | 99 _unloaded_instances = new (arena) GrowableArray<ciInstance*>(arena, 4, 0, NULL); |
0 | 100 _return_addresses = |
101 new (arena) GrowableArray<ciReturnAddress*>(arena, 8, 0, NULL); | |
2177
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
102 |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
103 _symbols = new (arena) GrowableArray<ciSymbol*>(arena, 100, 0, NULL); |
0 | 104 } |
105 | |
106 // ------------------------------------------------------------------ | |
107 // ciObjectFactory::ciObjectFactory | |
108 void ciObjectFactory::initialize() { | |
109 ASSERT_IN_VM; | |
110 JavaThread* thread = JavaThread::current(); | |
111 HandleMark handle_mark(thread); | |
112 | |
113 // This Arena is long lived and exists in the resource mark of the | |
114 // compiler thread that initializes the initial ciObjectFactory which | |
115 // creates the shared ciObjects that all later ciObjectFactories use. | |
6197 | 116 Arena* arena = new (mtCompiler) Arena(); |
0 | 117 ciEnv initial(arena); |
118 ciEnv* env = ciEnv::current(); | |
119 env->_factory->init_shared_objects(); | |
120 | |
121 _initialized = true; | |
122 | |
123 } | |
124 | |
125 void ciObjectFactory::init_shared_objects() { | |
126 | |
127 _next_ident = 1; // start numbering CI objects at 1 | |
128 | |
129 { | |
130 // Create the shared symbols, but not in _shared_ci_objects. | |
131 int i; | |
132 for (i = vmSymbols::FIRST_SID; i < vmSymbols::SID_LIMIT; i++) { | |
2177
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
133 Symbol* vmsym = vmSymbols::symbol_at((vmSymbols::SID) i); |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
134 assert(vmSymbols::find_sid(vmsym) == i, "1-1 mapping"); |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
135 ciSymbol* sym = new (_arena) ciSymbol(vmsym, (vmSymbols::SID) i); |
0 | 136 init_ident_of(sym); |
137 _shared_ci_symbols[i] = sym; | |
138 } | |
139 #ifdef ASSERT | |
140 for (i = vmSymbols::FIRST_SID; i < vmSymbols::SID_LIMIT; i++) { | |
2177
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
141 Symbol* vmsym = vmSymbols::symbol_at((vmSymbols::SID) i); |
0 | 142 ciSymbol* sym = vm_symbol_at((vmSymbols::SID) i); |
2177
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
143 assert(sym->get_symbol() == vmsym, "oop must match"); |
0 | 144 } |
2177
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
145 assert(ciSymbol::void_class_signature()->get_symbol() == vmSymbols::void_class_signature(), "spot check"); |
0 | 146 #endif |
147 } | |
148 | |
149 _ci_objects = new (_arena) GrowableArray<ciObject*>(_arena, 64, 0, NULL); | |
150 | |
151 for (int i = T_BOOLEAN; i <= T_CONFLICT; i++) { | |
152 BasicType t = (BasicType)i; | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
153 if (type2name(t) != NULL && t != T_OBJECT && t != T_ARRAY && t != T_NARROWOOP) { |
0 | 154 ciType::_basic_types[t] = new (_arena) ciType(t); |
155 init_ident_of(ciType::_basic_types[t]); | |
156 } | |
157 } | |
158 | |
159 ciEnv::_null_object_instance = new (_arena) ciNullObject(); | |
160 init_ident_of(ciEnv::_null_object_instance); | |
161 ciEnv::_method_klass_instance = | |
162 get(Universe::methodKlassObj())->as_method_klass(); | |
163 ciEnv::_klass_klass_instance = | |
164 get(Universe::klassKlassObj())->as_klass_klass(); | |
165 ciEnv::_instance_klass_klass_instance = | |
166 get(Universe::instanceKlassKlassObj()) | |
167 ->as_instance_klass_klass(); | |
168 ciEnv::_type_array_klass_klass_instance = | |
169 get(Universe::typeArrayKlassKlassObj()) | |
170 ->as_type_array_klass_klass(); | |
171 ciEnv::_obj_array_klass_klass_instance = | |
172 get(Universe::objArrayKlassKlassObj()) | |
173 ->as_obj_array_klass_klass(); | |
1142 | 174 |
175 #define WK_KLASS_DEFN(name, ignore_s, opt) \ | |
176 if (SystemDictionary::name() != NULL) \ | |
177 ciEnv::_##name = get(SystemDictionary::name())->as_instance_klass(); | |
178 | |
179 WK_KLASSES_DO(WK_KLASS_DEFN) | |
180 #undef WK_KLASS_DEFN | |
0 | 181 |
182 for (int len = -1; len != _ci_objects->length(); ) { | |
183 len = _ci_objects->length(); | |
184 for (int i2 = 0; i2 < len; i2++) { | |
185 ciObject* obj = _ci_objects->at(i2); | |
186 if (obj->is_loaded() && obj->is_instance_klass()) { | |
187 obj->as_instance_klass()->compute_nonstatic_fields(); | |
188 } | |
189 } | |
190 } | |
191 | |
2177
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
192 ciEnv::_unloaded_cisymbol = ciObjectFactory::get_symbol(vmSymbols::dummy_symbol()); |
0 | 193 // Create dummy instanceKlass and objArrayKlass object and assign them idents |
194 ciEnv::_unloaded_ciinstance_klass = new (_arena) ciInstanceKlass(ciEnv::_unloaded_cisymbol, NULL, NULL); | |
195 init_ident_of(ciEnv::_unloaded_ciinstance_klass); | |
196 ciEnv::_unloaded_ciobjarrayklass = new (_arena) ciObjArrayKlass(ciEnv::_unloaded_cisymbol, ciEnv::_unloaded_ciinstance_klass, 1); | |
197 init_ident_of(ciEnv::_unloaded_ciobjarrayklass); | |
198 assert(ciEnv::_unloaded_ciobjarrayklass->is_obj_array_klass(), "just checking"); | |
199 | |
200 get(Universe::boolArrayKlassObj()); | |
201 get(Universe::charArrayKlassObj()); | |
202 get(Universe::singleArrayKlassObj()); | |
203 get(Universe::doubleArrayKlassObj()); | |
204 get(Universe::byteArrayKlassObj()); | |
205 get(Universe::shortArrayKlassObj()); | |
206 get(Universe::intArrayKlassObj()); | |
207 get(Universe::longArrayKlassObj()); | |
208 | |
209 | |
210 | |
211 assert(_non_perm_count == 0, "no shared non-perm objects"); | |
212 | |
213 // The shared_ident_limit is the first ident number that will | |
214 // be used for non-shared objects. That is, numbers less than | |
215 // this limit are permanently assigned to shared CI objects, | |
216 // while the higher numbers are recycled afresh by each new ciEnv. | |
217 | |
218 _shared_ident_limit = _next_ident; | |
219 _shared_ci_objects = _ci_objects; | |
220 } | |
221 | |
2177
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
222 |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
223 ciSymbol* ciObjectFactory::get_symbol(Symbol* key) { |
4977
532be189cf09
Reducing diff to hsx24
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4137
diff
changeset
|
224 #ifndef GRAAL |
2177
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
225 vmSymbols::SID sid = vmSymbols::find_sid(key); |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
226 if (sid != vmSymbols::NO_SID) { |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
227 // do not pollute the main cache with it |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
228 return vm_symbol_at(sid); |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
229 } |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
230 |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
231 assert(vmSymbols::find_sid(key) == vmSymbols::NO_SID, ""); |
4977
532be189cf09
Reducing diff to hsx24
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4137
diff
changeset
|
232 #endif |
532be189cf09
Reducing diff to hsx24
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
4137
diff
changeset
|
233 |
2177
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
234 ciSymbol* s = new (arena()) ciSymbol(key, vmSymbols::NO_SID); |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
235 _symbols->push(s); |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
236 return s; |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
237 } |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
238 |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
239 // Decrement the refcount when done on symbols referenced by this compilation. |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
240 void ciObjectFactory::remove_symbols() { |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
241 for (int i = 0; i < _symbols->length(); i++) { |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
242 ciSymbol* s = _symbols->at(i); |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
243 s->get_symbol()->decrement_refcount(); |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
244 } |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
245 // Since _symbols is resource allocated we're not allowed to delete it |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
246 // but it'll go away just the same. |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
247 } |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
248 |
0 | 249 // ------------------------------------------------------------------ |
250 // ciObjectFactory::get | |
251 // | |
252 // Get the ciObject corresponding to some oop. If the ciObject has | |
253 // already been created, it is returned. Otherwise, a new ciObject | |
254 // is created. | |
255 ciObject* ciObjectFactory::get(oop key) { | |
256 ASSERT_IN_VM; | |
257 | |
258 #ifdef ASSERT | |
909
b32a809aab08
6866585: debug code in ciObjectFactory too slow for large objects
jcoomes
parents:
196
diff
changeset
|
259 if (CIObjectFactoryVerify) { |
b32a809aab08
6866585: debug code in ciObjectFactory too slow for large objects
jcoomes
parents:
196
diff
changeset
|
260 oop last = NULL; |
b32a809aab08
6866585: debug code in ciObjectFactory too slow for large objects
jcoomes
parents:
196
diff
changeset
|
261 for (int j = 0; j< _ci_objects->length(); j++) { |
b32a809aab08
6866585: debug code in ciObjectFactory too slow for large objects
jcoomes
parents:
196
diff
changeset
|
262 oop o = _ci_objects->at(j)->get_oop(); |
b32a809aab08
6866585: debug code in ciObjectFactory too slow for large objects
jcoomes
parents:
196
diff
changeset
|
263 assert(last < o, "out of order"); |
b32a809aab08
6866585: debug code in ciObjectFactory too slow for large objects
jcoomes
parents:
196
diff
changeset
|
264 last = o; |
b32a809aab08
6866585: debug code in ciObjectFactory too slow for large objects
jcoomes
parents:
196
diff
changeset
|
265 } |
0 | 266 } |
267 #endif // ASSERT | |
268 int len = _ci_objects->length(); | |
269 int index = find(key, _ci_objects); | |
270 #ifdef ASSERT | |
909
b32a809aab08
6866585: debug code in ciObjectFactory too slow for large objects
jcoomes
parents:
196
diff
changeset
|
271 if (CIObjectFactoryVerify) { |
b32a809aab08
6866585: debug code in ciObjectFactory too slow for large objects
jcoomes
parents:
196
diff
changeset
|
272 for (int i=0; i<_ci_objects->length(); i++) { |
b32a809aab08
6866585: debug code in ciObjectFactory too slow for large objects
jcoomes
parents:
196
diff
changeset
|
273 if (_ci_objects->at(i)->get_oop() == key) { |
b32a809aab08
6866585: debug code in ciObjectFactory too slow for large objects
jcoomes
parents:
196
diff
changeset
|
274 assert(index == i, " bad lookup"); |
b32a809aab08
6866585: debug code in ciObjectFactory too slow for large objects
jcoomes
parents:
196
diff
changeset
|
275 } |
0 | 276 } |
277 } | |
278 #endif | |
279 if (!is_found_at(index, key, _ci_objects)) { | |
280 // Check in the non-perm area before putting it in the list. | |
281 NonPermObject* &bucket = find_non_perm(key); | |
282 if (bucket != NULL) { | |
283 return bucket->object(); | |
284 } | |
285 | |
286 // The ciObject does not yet exist. Create it and insert it | |
287 // into the cache. | |
288 Handle keyHandle(key); | |
289 ciObject* new_object = create_new_object(keyHandle()); | |
290 assert(keyHandle() == new_object->get_oop(), "must be properly recorded"); | |
291 init_ident_of(new_object); | |
989
148e5441d916
6863023: need non-perm oops in code cache for JSR 292
jrose
parents:
909
diff
changeset
|
292 if (!new_object->is_perm()) { |
0 | 293 // Not a perm-space object. |
294 insert_non_perm(bucket, keyHandle(), new_object); | |
295 return new_object; | |
296 } | |
297 if (len != _ci_objects->length()) { | |
298 // creating the new object has recursively entered new objects | |
299 // into the table. We need to recompute our index. | |
300 index = find(keyHandle(), _ci_objects); | |
301 } | |
302 assert(!is_found_at(index, keyHandle(), _ci_objects), "no double insert"); | |
303 insert(index, new_object, _ci_objects); | |
304 return new_object; | |
305 } | |
306 return _ci_objects->at(index); | |
307 } | |
308 | |
309 // ------------------------------------------------------------------ | |
310 // ciObjectFactory::create_new_object | |
311 // | |
312 // Create a new ciObject from an oop. | |
313 // | |
314 // Implementation note: this functionality could be virtual behavior | |
315 // of the oop itself. For now, we explicitly marshal the object. | |
316 ciObject* ciObjectFactory::create_new_object(oop o) { | |
317 EXCEPTION_CONTEXT; | |
318 | |
2177
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
319 if (o->is_klass()) { |
0 | 320 KlassHandle h_k(THREAD, (klassOop)o); |
321 Klass* k = ((klassOop)o)->klass_part(); | |
322 if (k->oop_is_instance()) { | |
323 return new (arena()) ciInstanceKlass(h_k); | |
324 } else if (k->oop_is_objArray()) { | |
325 return new (arena()) ciObjArrayKlass(h_k); | |
326 } else if (k->oop_is_typeArray()) { | |
327 return new (arena()) ciTypeArrayKlass(h_k); | |
328 } else if (k->oop_is_method()) { | |
329 return new (arena()) ciMethodKlass(h_k); | |
330 } else if (k->oop_is_klass()) { | |
331 if (k->oop_is_objArrayKlass()) { | |
332 return new (arena()) ciObjArrayKlassKlass(h_k); | |
333 } else if (k->oop_is_typeArrayKlass()) { | |
334 return new (arena()) ciTypeArrayKlassKlass(h_k); | |
335 } else if (k->oop_is_instanceKlass()) { | |
336 return new (arena()) ciInstanceKlassKlass(h_k); | |
337 } else { | |
338 assert(o == Universe::klassKlassObj(), "bad klassKlass"); | |
339 return new (arena()) ciKlassKlass(h_k); | |
340 } | |
341 } | |
342 } else if (o->is_method()) { | |
343 methodHandle h_m(THREAD, (methodOop)o); | |
344 return new (arena()) ciMethod(h_m); | |
345 } else if (o->is_methodData()) { | |
346 methodDataHandle h_md(THREAD, (methodDataOop)o); | |
347 return new (arena()) ciMethodData(h_md); | |
348 } else if (o->is_instance()) { | |
349 instanceHandle h_i(THREAD, (instanceOop)o); | |
2357
8033953d67ff
7012648: move JSR 292 to package java.lang.invoke and adjust names
jrose
parents:
2177
diff
changeset
|
350 if (java_lang_invoke_CallSite::is_instance(o)) |
1138
dd57230ba8fe
6893268: additional dynamic language related optimizations in C2
twisti
parents:
1137
diff
changeset
|
351 return new (arena()) ciCallSite(h_i); |
6266
1d7922586cf6
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
6197
diff
changeset
|
352 else if (java_lang_invoke_MemberName::is_instance(o)) |
1d7922586cf6
7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents:
6197
diff
changeset
|
353 return new (arena()) ciMemberName(h_i); |
2357
8033953d67ff
7012648: move JSR 292 to package java.lang.invoke and adjust names
jrose
parents:
2177
diff
changeset
|
354 else if (java_lang_invoke_MethodHandle::is_instance(o)) |
1138
dd57230ba8fe
6893268: additional dynamic language related optimizations in C2
twisti
parents:
1137
diff
changeset
|
355 return new (arena()) ciMethodHandle(h_i); |
dd57230ba8fe
6893268: additional dynamic language related optimizations in C2
twisti
parents:
1137
diff
changeset
|
356 else |
dd57230ba8fe
6893268: additional dynamic language related optimizations in C2
twisti
parents:
1137
diff
changeset
|
357 return new (arena()) ciInstance(h_i); |
0 | 358 } else if (o->is_objArray()) { |
359 objArrayHandle h_oa(THREAD, (objArrayOop)o); | |
360 return new (arena()) ciObjArray(h_oa); | |
361 } else if (o->is_typeArray()) { | |
362 typeArrayHandle h_ta(THREAD, (typeArrayOop)o); | |
363 return new (arena()) ciTypeArray(h_ta); | |
1137
97125851f396
6829187: compiler optimizations required for JSR 292
twisti
parents:
1080
diff
changeset
|
364 } else if (o->is_constantPoolCache()) { |
97125851f396
6829187: compiler optimizations required for JSR 292
twisti
parents:
1080
diff
changeset
|
365 constantPoolCacheHandle h_cpc(THREAD, (constantPoolCacheOop) o); |
97125851f396
6829187: compiler optimizations required for JSR 292
twisti
parents:
1080
diff
changeset
|
366 return new (arena()) ciCPCache(h_cpc); |
0 | 367 } |
368 | |
369 // The oop is of some type not supported by the compiler interface. | |
370 ShouldNotReachHere(); | |
371 return NULL; | |
372 } | |
373 | |
374 //------------------------------------------------------------------ | |
375 // ciObjectFactory::get_unloaded_method | |
376 // | |
377 // Get the ciMethod representing an unloaded/unfound method. | |
378 // | |
379 // Implementation note: unloaded methods are currently stored in | |
380 // an unordered array, requiring a linear-time lookup for each | |
381 // unloaded method. This may need to change. | |
382 ciMethod* ciObjectFactory::get_unloaded_method(ciInstanceKlass* holder, | |
383 ciSymbol* name, | |
4001
5eb9169b1a14
7092712: JSR 292: unloaded invokedynamic call sites can lead to a crash with signature types not on BCP
twisti
parents:
2376
diff
changeset
|
384 ciSymbol* signature, |
5eb9169b1a14
7092712: JSR 292: unloaded invokedynamic call sites can lead to a crash with signature types not on BCP
twisti
parents:
2376
diff
changeset
|
385 ciInstanceKlass* accessor) { |
5eb9169b1a14
7092712: JSR 292: unloaded invokedynamic call sites can lead to a crash with signature types not on BCP
twisti
parents:
2376
diff
changeset
|
386 ciSignature* that = NULL; |
5eb9169b1a14
7092712: JSR 292: unloaded invokedynamic call sites can lead to a crash with signature types not on BCP
twisti
parents:
2376
diff
changeset
|
387 for (int i = 0; i < _unloaded_methods->length(); i++) { |
0 | 388 ciMethod* entry = _unloaded_methods->at(i); |
389 if (entry->holder()->equals(holder) && | |
390 entry->name()->equals(name) && | |
391 entry->signature()->as_symbol()->equals(signature)) { | |
4001
5eb9169b1a14
7092712: JSR 292: unloaded invokedynamic call sites can lead to a crash with signature types not on BCP
twisti
parents:
2376
diff
changeset
|
392 // Short-circuit slow resolve. |
5eb9169b1a14
7092712: JSR 292: unloaded invokedynamic call sites can lead to a crash with signature types not on BCP
twisti
parents:
2376
diff
changeset
|
393 if (entry->signature()->accessing_klass() == accessor) { |
5eb9169b1a14
7092712: JSR 292: unloaded invokedynamic call sites can lead to a crash with signature types not on BCP
twisti
parents:
2376
diff
changeset
|
394 // We've found a match. |
5eb9169b1a14
7092712: JSR 292: unloaded invokedynamic call sites can lead to a crash with signature types not on BCP
twisti
parents:
2376
diff
changeset
|
395 return entry; |
5eb9169b1a14
7092712: JSR 292: unloaded invokedynamic call sites can lead to a crash with signature types not on BCP
twisti
parents:
2376
diff
changeset
|
396 } else { |
5eb9169b1a14
7092712: JSR 292: unloaded invokedynamic call sites can lead to a crash with signature types not on BCP
twisti
parents:
2376
diff
changeset
|
397 // Lazily create ciSignature |
5eb9169b1a14
7092712: JSR 292: unloaded invokedynamic call sites can lead to a crash with signature types not on BCP
twisti
parents:
2376
diff
changeset
|
398 if (that == NULL) that = new (arena()) ciSignature(accessor, constantPoolHandle(), signature); |
5eb9169b1a14
7092712: JSR 292: unloaded invokedynamic call sites can lead to a crash with signature types not on BCP
twisti
parents:
2376
diff
changeset
|
399 if (entry->signature()->equals(that)) { |
5eb9169b1a14
7092712: JSR 292: unloaded invokedynamic call sites can lead to a crash with signature types not on BCP
twisti
parents:
2376
diff
changeset
|
400 // We've found a match. |
5eb9169b1a14
7092712: JSR 292: unloaded invokedynamic call sites can lead to a crash with signature types not on BCP
twisti
parents:
2376
diff
changeset
|
401 return entry; |
5eb9169b1a14
7092712: JSR 292: unloaded invokedynamic call sites can lead to a crash with signature types not on BCP
twisti
parents:
2376
diff
changeset
|
402 } |
5eb9169b1a14
7092712: JSR 292: unloaded invokedynamic call sites can lead to a crash with signature types not on BCP
twisti
parents:
2376
diff
changeset
|
403 } |
0 | 404 } |
405 } | |
406 | |
407 // This is a new unloaded method. Create it and stick it in | |
408 // the cache. | |
4001
5eb9169b1a14
7092712: JSR 292: unloaded invokedynamic call sites can lead to a crash with signature types not on BCP
twisti
parents:
2376
diff
changeset
|
409 ciMethod* new_method = new (arena()) ciMethod(holder, name, signature, accessor); |
0 | 410 |
411 init_ident_of(new_method); | |
412 _unloaded_methods->append(new_method); | |
413 | |
414 return new_method; | |
415 } | |
416 | |
417 //------------------------------------------------------------------ | |
418 // ciObjectFactory::get_unloaded_klass | |
419 // | |
420 // Get a ciKlass representing an unloaded klass. | |
421 // | |
422 // Implementation note: unloaded klasses are currently stored in | |
423 // an unordered array, requiring a linear-time lookup for each | |
424 // unloaded klass. This may need to change. | |
425 ciKlass* ciObjectFactory::get_unloaded_klass(ciKlass* accessing_klass, | |
426 ciSymbol* name, | |
427 bool create_if_not_found) { | |
428 EXCEPTION_CONTEXT; | |
429 oop loader = NULL; | |
430 oop domain = NULL; | |
431 if (accessing_klass != NULL) { | |
432 loader = accessing_klass->loader(); | |
433 domain = accessing_klass->protection_domain(); | |
434 } | |
435 for (int i=0; i<_unloaded_klasses->length(); i++) { | |
436 ciKlass* entry = _unloaded_klasses->at(i); | |
437 if (entry->name()->equals(name) && | |
438 entry->loader() == loader && | |
439 entry->protection_domain() == domain) { | |
440 // We've found a match. | |
441 return entry; | |
442 } | |
443 } | |
444 | |
445 if (!create_if_not_found) | |
446 return NULL; | |
447 | |
448 // This is a new unloaded klass. Create it and stick it in | |
449 // the cache. | |
450 ciKlass* new_klass = NULL; | |
451 | |
452 // Two cases: this is an unloaded objArrayKlass or an | |
453 // unloaded instanceKlass. Deal with both. | |
454 if (name->byte_at(0) == '[') { | |
455 // Decompose the name.' | |
2177
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
456 FieldArrayInfo fd; |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
457 BasicType element_type = FieldType::get_array_info(name->get_symbol(), |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
458 fd, THREAD); |
0 | 459 if (HAS_PENDING_EXCEPTION) { |
460 CLEAR_PENDING_EXCEPTION; | |
461 CURRENT_THREAD_ENV->record_out_of_memory_failure(); | |
462 return ciEnv::_unloaded_ciobjarrayklass; | |
463 } | |
2177
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
464 int dimension = fd.dimension(); |
0 | 465 assert(element_type != T_ARRAY, "unsuccessful decomposition"); |
466 ciKlass* element_klass = NULL; | |
467 if (element_type == T_OBJECT) { | |
468 ciEnv *env = CURRENT_THREAD_ENV; | |
2177
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
469 ciSymbol* ci_name = env->get_symbol(fd.object_key()); |
0 | 470 element_klass = |
471 env->get_klass_by_name(accessing_klass, ci_name, false)->as_instance_klass(); | |
472 } else { | |
473 assert(dimension > 1, "one dimensional type arrays are always loaded."); | |
474 | |
475 // The type array itself takes care of one of the dimensions. | |
476 dimension--; | |
477 | |
478 // The element klass is a typeArrayKlass. | |
479 element_klass = ciTypeArrayKlass::make(element_type); | |
480 } | |
481 new_klass = new (arena()) ciObjArrayKlass(name, element_klass, dimension); | |
482 } else { | |
483 jobject loader_handle = NULL; | |
484 jobject domain_handle = NULL; | |
485 if (accessing_klass != NULL) { | |
486 loader_handle = accessing_klass->loader_handle(); | |
487 domain_handle = accessing_klass->protection_domain_handle(); | |
488 } | |
489 new_klass = new (arena()) ciInstanceKlass(name, loader_handle, domain_handle); | |
490 } | |
491 init_ident_of(new_klass); | |
492 _unloaded_klasses->append(new_klass); | |
493 | |
494 return new_klass; | |
495 } | |
496 | |
1602 | 497 |
498 //------------------------------------------------------------------ | |
499 // ciObjectFactory::get_unloaded_instance | |
500 // | |
501 // Get a ciInstance representing an as-yet undetermined instance of a given class. | |
502 // | |
503 ciInstance* ciObjectFactory::get_unloaded_instance(ciInstanceKlass* instance_klass) { | |
504 for (int i=0; i<_unloaded_instances->length(); i++) { | |
505 ciInstance* entry = _unloaded_instances->at(i); | |
506 if (entry->klass()->equals(instance_klass)) { | |
507 // We've found a match. | |
508 return entry; | |
509 } | |
510 } | |
511 | |
512 // This is a new unloaded instance. Create it and stick it in | |
513 // the cache. | |
514 ciInstance* new_instance = new (arena()) ciInstance(instance_klass); | |
515 | |
516 init_ident_of(new_instance); | |
517 _unloaded_instances->append(new_instance); | |
518 | |
519 // make sure it looks the way we want: | |
520 assert(!new_instance->is_loaded(), ""); | |
521 assert(new_instance->klass() == instance_klass, ""); | |
522 | |
523 return new_instance; | |
524 } | |
525 | |
526 | |
527 //------------------------------------------------------------------ | |
528 // ciObjectFactory::get_unloaded_klass_mirror | |
529 // | |
530 // Get a ciInstance representing an unresolved klass mirror. | |
531 // | |
532 // Currently, this ignores the parameters and returns a unique unloaded instance. | |
533 ciInstance* ciObjectFactory::get_unloaded_klass_mirror(ciKlass* type) { | |
534 assert(ciEnv::_Class_klass != NULL, ""); | |
535 return get_unloaded_instance(ciEnv::_Class_klass->as_instance_klass()); | |
536 } | |
537 | |
538 //------------------------------------------------------------------ | |
539 // ciObjectFactory::get_unloaded_method_handle_constant | |
540 // | |
541 // Get a ciInstance representing an unresolved method handle constant. | |
542 // | |
543 // Currently, this ignores the parameters and returns a unique unloaded instance. | |
544 ciInstance* ciObjectFactory::get_unloaded_method_handle_constant(ciKlass* holder, | |
545 ciSymbol* name, | |
546 ciSymbol* signature, | |
547 int ref_kind) { | |
548 if (ciEnv::_MethodHandle_klass == NULL) return NULL; | |
549 return get_unloaded_instance(ciEnv::_MethodHandle_klass->as_instance_klass()); | |
550 } | |
551 | |
552 //------------------------------------------------------------------ | |
553 // ciObjectFactory::get_unloaded_method_type_constant | |
554 // | |
555 // Get a ciInstance representing an unresolved method type constant. | |
556 // | |
557 // Currently, this ignores the parameters and returns a unique unloaded instance. | |
558 ciInstance* ciObjectFactory::get_unloaded_method_type_constant(ciSymbol* signature) { | |
559 if (ciEnv::_MethodType_klass == NULL) return NULL; | |
560 return get_unloaded_instance(ciEnv::_MethodType_klass->as_instance_klass()); | |
561 } | |
562 | |
563 | |
564 | |
0 | 565 //------------------------------------------------------------------ |
566 // ciObjectFactory::get_empty_methodData | |
567 // | |
568 // Get the ciMethodData representing the methodData for a method with | |
569 // none. | |
570 ciMethodData* ciObjectFactory::get_empty_methodData() { | |
571 ciMethodData* new_methodData = new (arena()) ciMethodData(); | |
572 init_ident_of(new_methodData); | |
573 return new_methodData; | |
574 } | |
575 | |
576 //------------------------------------------------------------------ | |
577 // ciObjectFactory::get_return_address | |
578 // | |
579 // Get a ciReturnAddress for a specified bci. | |
580 ciReturnAddress* ciObjectFactory::get_return_address(int bci) { | |
581 for (int i=0; i<_return_addresses->length(); i++) { | |
582 ciReturnAddress* entry = _return_addresses->at(i); | |
583 if (entry->bci() == bci) { | |
584 // We've found a match. | |
585 return entry; | |
586 } | |
587 } | |
588 | |
589 ciReturnAddress* new_ret_addr = new (arena()) ciReturnAddress(bci); | |
590 init_ident_of(new_ret_addr); | |
591 _return_addresses->append(new_ret_addr); | |
592 return new_ret_addr; | |
593 } | |
594 | |
595 // ------------------------------------------------------------------ | |
596 // ciObjectFactory::init_ident_of | |
597 void ciObjectFactory::init_ident_of(ciObject* obj) { | |
598 obj->set_ident(_next_ident++); | |
599 } | |
600 | |
2177
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
601 void ciObjectFactory::init_ident_of(ciSymbol* obj) { |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
602 obj->set_ident(_next_ident++); |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
603 } |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
604 |
0 | 605 |
606 // ------------------------------------------------------------------ | |
607 // ciObjectFactory::find | |
608 // | |
609 // Use binary search to find the position of this oop in the cache. | |
610 // If there is no entry in the cache corresponding to this oop, return | |
611 // the position at which the oop should be inserted. | |
612 int ciObjectFactory::find(oop key, GrowableArray<ciObject*>* objects) { | |
613 int min = 0; | |
614 int max = objects->length()-1; | |
615 | |
616 // print_contents(); | |
617 | |
618 while (max >= min) { | |
619 int mid = (max + min) / 2; | |
620 oop value = objects->at(mid)->get_oop(); | |
621 if (value < key) { | |
622 min = mid + 1; | |
623 } else if (value > key) { | |
624 max = mid - 1; | |
625 } else { | |
626 return mid; | |
627 } | |
628 } | |
629 return min; | |
630 } | |
631 | |
632 // ------------------------------------------------------------------ | |
633 // ciObjectFactory::is_found_at | |
634 // | |
635 // Verify that the binary seach found the given key. | |
636 bool ciObjectFactory::is_found_at(int index, oop key, GrowableArray<ciObject*>* objects) { | |
637 return (index < objects->length() && | |
638 objects->at(index)->get_oop() == key); | |
639 } | |
640 | |
641 | |
642 // ------------------------------------------------------------------ | |
643 // ciObjectFactory::insert | |
644 // | |
645 // Insert a ciObject into the table at some index. | |
646 void ciObjectFactory::insert(int index, ciObject* obj, GrowableArray<ciObject*>* objects) { | |
647 int len = objects->length(); | |
648 if (len == index) { | |
649 objects->append(obj); | |
650 } else { | |
651 objects->append(objects->at(len-1)); | |
652 int pos; | |
653 for (pos = len-2; pos >= index; pos--) { | |
654 objects->at_put(pos+1,objects->at(pos)); | |
655 } | |
656 objects->at_put(index, obj); | |
657 } | |
658 #ifdef ASSERT | |
909
b32a809aab08
6866585: debug code in ciObjectFactory too slow for large objects
jcoomes
parents:
196
diff
changeset
|
659 if (CIObjectFactoryVerify) { |
b32a809aab08
6866585: debug code in ciObjectFactory too slow for large objects
jcoomes
parents:
196
diff
changeset
|
660 oop last = NULL; |
b32a809aab08
6866585: debug code in ciObjectFactory too slow for large objects
jcoomes
parents:
196
diff
changeset
|
661 for (int j = 0; j< objects->length(); j++) { |
b32a809aab08
6866585: debug code in ciObjectFactory too slow for large objects
jcoomes
parents:
196
diff
changeset
|
662 oop o = objects->at(j)->get_oop(); |
b32a809aab08
6866585: debug code in ciObjectFactory too slow for large objects
jcoomes
parents:
196
diff
changeset
|
663 assert(last < o, "out of order"); |
b32a809aab08
6866585: debug code in ciObjectFactory too slow for large objects
jcoomes
parents:
196
diff
changeset
|
664 last = o; |
b32a809aab08
6866585: debug code in ciObjectFactory too slow for large objects
jcoomes
parents:
196
diff
changeset
|
665 } |
0 | 666 } |
667 #endif // ASSERT | |
668 } | |
669 | |
670 static ciObjectFactory::NonPermObject* emptyBucket = NULL; | |
671 | |
672 // ------------------------------------------------------------------ | |
673 // ciObjectFactory::find_non_perm | |
674 // | |
675 // Use a small hash table, hashed on the klass of the key. | |
676 // If there is no entry in the cache corresponding to this oop, return | |
677 // the null tail of the bucket into which the oop should be inserted. | |
678 ciObjectFactory::NonPermObject* &ciObjectFactory::find_non_perm(oop key) { | |
679 // Be careful: is_perm might change from false to true. | |
680 // Thus, there might be a matching perm object in the table. | |
681 // If there is, this probe must find it. | |
682 if (key->is_perm() && _non_perm_count == 0) { | |
683 return emptyBucket; | |
684 } else if (key->is_instance()) { | |
2376
c7f3d0b4570f
7017732: move static fields into Class to prepare for perm gen removal
never
parents:
2357
diff
changeset
|
685 if (key->klass() == SystemDictionary::Class_klass() && JavaObjectsInPerm) { |
0 | 686 // class mirror instances are always perm |
687 return emptyBucket; | |
688 } | |
689 // fall through to probe | |
690 } else if (key->is_array()) { | |
691 // fall through to probe | |
692 } else { | |
693 // not an array or instance | |
694 return emptyBucket; | |
695 } | |
696 | |
697 ciObject* klass = get(key->klass()); | |
698 NonPermObject* *bp = &_non_perm_bucket[(unsigned) klass->hash() % NON_PERM_BUCKETS]; | |
699 for (NonPermObject* p; (p = (*bp)) != NULL; bp = &p->next()) { | |
700 if (is_equal(p, key)) break; | |
701 } | |
702 return (*bp); | |
703 } | |
704 | |
705 | |
706 | |
707 // ------------------------------------------------------------------ | |
708 // Code for for NonPermObject | |
709 // | |
710 inline ciObjectFactory::NonPermObject::NonPermObject(ciObjectFactory::NonPermObject* &bucket, oop key, ciObject* object) { | |
711 assert(ciObjectFactory::is_initialized(), ""); | |
712 _object = object; | |
713 _next = bucket; | |
714 bucket = this; | |
715 } | |
716 | |
717 | |
718 | |
719 // ------------------------------------------------------------------ | |
720 // ciObjectFactory::insert_non_perm | |
721 // | |
722 // Insert a ciObject into the non-perm table. | |
723 void ciObjectFactory::insert_non_perm(ciObjectFactory::NonPermObject* &where, oop key, ciObject* obj) { | |
724 assert(&where != &emptyBucket, "must not try to fill empty bucket"); | |
725 NonPermObject* p = new (arena()) NonPermObject(where, key, obj); | |
726 assert(where == p && is_equal(p, key) && p->object() == obj, "entry must match"); | |
727 assert(find_non_perm(key) == p, "must find the same spot"); | |
728 ++_non_perm_count; | |
729 } | |
730 | |
731 // ------------------------------------------------------------------ | |
732 // ciObjectFactory::vm_symbol_at | |
733 // Get the ciSymbol corresponding to some index in vmSymbols. | |
734 ciSymbol* ciObjectFactory::vm_symbol_at(int index) { | |
735 assert(index >= vmSymbols::FIRST_SID && index < vmSymbols::SID_LIMIT, "oob"); | |
736 return _shared_ci_symbols[index]; | |
737 } | |
738 | |
739 // ------------------------------------------------------------------ | |
740 // ciObjectFactory::print_contents_impl | |
741 void ciObjectFactory::print_contents_impl() { | |
742 int len = _ci_objects->length(); | |
743 tty->print_cr("ciObjectFactory (%d) oop contents:", len); | |
744 for (int i=0; i<len; i++) { | |
745 _ci_objects->at(i)->print(); | |
746 tty->cr(); | |
747 } | |
748 } | |
749 | |
750 // ------------------------------------------------------------------ | |
751 // ciObjectFactory::print_contents | |
752 void ciObjectFactory::print_contents() { | |
753 print(); | |
754 tty->cr(); | |
755 GUARDED_VM_ENTRY(print_contents_impl();) | |
756 } | |
757 | |
758 // ------------------------------------------------------------------ | |
759 // ciObjectFactory::print | |
760 // | |
761 // Print debugging information about the object factory | |
762 void ciObjectFactory::print() { | |
1602 | 763 tty->print("<ciObjectFactory oops=%d unloaded_methods=%d unloaded_instances=%d unloaded_klasses=%d>", |
0 | 764 _ci_objects->length(), _unloaded_methods->length(), |
1602 | 765 _unloaded_instances->length(), |
0 | 766 _unloaded_klasses->length()); |
767 } |