Mercurial > hg > graal-compiler
annotate src/share/vm/oops/cpCacheKlass.cpp @ 1649:a528509c992b
6968336: VM crash guarantee(!nm->is_zombie()) failed: cannot lock a zombie method
Reviewed-by: twisti
author | never |
---|---|
date | Thu, 15 Jul 2010 08:54:48 -0700 |
parents | c18cbe5936b8 |
children | 126ea7725993 9d7a8ab3736b |
rev | line source |
---|---|
0 | 1 /* |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1155
diff
changeset
|
2 * Copyright (c) 1998, 2009, 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:
1155
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1155
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:
1155
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
25 #include "incls/_precompiled.incl" | |
26 #include "incls/_cpCacheKlass.cpp.incl" | |
27 | |
28 | |
29 int constantPoolCacheKlass::oop_size(oop obj) const { | |
30 assert(obj->is_constantPoolCache(), "must be constantPool"); | |
31 return constantPoolCacheOop(obj)->object_size(); | |
32 } | |
33 | |
34 | |
542
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
35 constantPoolCacheOop constantPoolCacheKlass::allocate(int length, |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
36 bool is_conc_safe, |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
37 TRAPS) { |
0 | 38 // allocate memory |
39 int size = constantPoolCacheOopDesc::object_size(length); | |
542
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
40 |
0 | 41 KlassHandle klass (THREAD, as_klassOop()); |
542
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
42 |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
43 // This is the original code. The code from permanent_obj_allocate() |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
44 // was in-lined to allow the setting of is_conc_safe before the klass |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
45 // is installed. |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
46 // constantPoolCacheOop cache = (constantPoolCacheOop) |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
47 // CollectedHeap::permanent_obj_allocate(klass, size, CHECK_NULL); |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
48 |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
49 oop obj = CollectedHeap::permanent_obj_allocate_no_klass_install(klass, size, CHECK_NULL); |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
50 constantPoolCacheOop cache = (constantPoolCacheOop) obj; |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
51 cache->set_is_conc_safe(is_conc_safe); |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
52 // The store to is_conc_safe must be visible before the klass |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
53 // is set. This should be done safely because _is_conc_safe has |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
54 // been declared volatile. If there are any problems, consider adding |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
55 // OrderAccess::storestore(); |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
56 CollectedHeap::post_allocation_install_obj_klass(klass, obj, size); |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
57 NOT_PRODUCT(Universe::heap()->check_for_bad_heap_word_value((HeapWord*) obj, |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
58 size)); |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
59 |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
60 // The length field affects the size of the object. The allocation |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
61 // above allocates the correct size (see calculation of "size") but |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
62 // the size() method of the constant pool cache oop will not reflect |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
63 // that size until the correct length is set. |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
64 cache->set_length(length); |
542
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
65 |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
66 // The store of the length must be visible before is_conc_safe is |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
67 // set to a safe state. |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
68 // This should be done safely because _is_conc_safe has |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
69 // been declared volatile. If there are any problems, consider adding |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
70 // OrderAccess::storestore(); |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
71 cache->set_is_conc_safe(methodOopDesc::IsSafeConc); |
0 | 72 cache->set_constant_pool(NULL); |
73 return cache; | |
74 } | |
75 | |
76 klassOop constantPoolCacheKlass::create_klass(TRAPS) { | |
77 constantPoolCacheKlass o; | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
78 KlassHandle h_this_klass(THREAD, Universe::klassKlassObj()); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
79 KlassHandle k = base_create_klass(h_this_klass, header_size(), o.vtbl_value(), CHECK_NULL); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
80 // Make sure size calculation is right |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
81 assert(k()->size() == align_object_size(header_size()), "wrong size for object"); |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
82 java_lang_Class::create_mirror(k, CHECK_NULL); // Allocate mirror |
0 | 83 return k(); |
84 } | |
85 | |
86 | |
87 void constantPoolCacheKlass::oop_follow_contents(oop obj) { | |
88 assert(obj->is_constantPoolCache(), "obj must be constant pool cache"); | |
89 constantPoolCacheOop cache = (constantPoolCacheOop)obj; | |
90 // Performance tweak: We skip iterating over the klass pointer since we | |
91 // know that Universe::constantPoolCacheKlassObj never moves. | |
92 // gc of constant pool cache instance variables | |
93 MarkSweep::mark_and_push((oop*)cache->constant_pool_addr()); | |
94 // gc of constant pool cache entries | |
95 int i = cache->length(); | |
96 while (i-- > 0) cache->entry_at(i)->follow_contents(); | |
97 } | |
98 | |
99 #ifndef SERIALGC | |
100 void constantPoolCacheKlass::oop_follow_contents(ParCompactionManager* cm, | |
101 oop obj) { | |
102 assert(obj->is_constantPoolCache(), "obj must be constant pool cache"); | |
103 constantPoolCacheOop cache = (constantPoolCacheOop)obj; | |
104 // Performance tweak: We skip iterating over the klass pointer since we | |
105 // know that Universe::constantPoolCacheKlassObj never moves. | |
106 // gc of constant pool cache instance variables | |
107 PSParallelCompact::mark_and_push(cm, (oop*)cache->constant_pool_addr()); | |
108 // gc of constant pool cache entries | |
109 int i = cache->length(); | |
110 while (i-- > 0) cache->entry_at(i)->follow_contents(cm); | |
111 } | |
112 #endif // SERIALGC | |
113 | |
114 | |
115 int constantPoolCacheKlass::oop_oop_iterate(oop obj, OopClosure* blk) { | |
116 assert(obj->is_constantPoolCache(), "obj must be constant pool cache"); | |
117 constantPoolCacheOop cache = (constantPoolCacheOop)obj; | |
118 // Get size before changing pointers. | |
119 // Don't call size() or oop_size() since that is a virtual call. | |
120 int size = cache->object_size(); | |
121 // Performance tweak: We skip iterating over the klass pointer since we | |
122 // know that Universe::constantPoolCacheKlassObj never moves. | |
123 // iteration over constant pool cache instance variables | |
124 blk->do_oop((oop*)cache->constant_pool_addr()); | |
125 // iteration over constant pool cache entries | |
126 for (int i = 0; i < cache->length(); i++) cache->entry_at(i)->oop_iterate(blk); | |
127 return size; | |
128 } | |
129 | |
130 | |
131 int constantPoolCacheKlass::oop_oop_iterate_m(oop obj, OopClosure* blk, MemRegion mr) { | |
132 assert(obj->is_constantPoolCache(), "obj must be constant pool cache"); | |
133 constantPoolCacheOop cache = (constantPoolCacheOop)obj; | |
134 // Get size before changing pointers. | |
135 // Don't call size() or oop_size() since that is a virtual call. | |
136 int size = cache->object_size(); | |
137 // Performance tweak: We skip iterating over the klass pointer since we | |
138 // know that Universe::constantPoolCacheKlassObj never moves. | |
139 // iteration over constant pool cache instance variables | |
140 oop* addr = (oop*)cache->constant_pool_addr(); | |
141 if (mr.contains(addr)) blk->do_oop(addr); | |
142 // iteration over constant pool cache entries | |
143 for (int i = 0; i < cache->length(); i++) cache->entry_at(i)->oop_iterate_m(blk, mr); | |
144 return size; | |
145 } | |
146 | |
147 int constantPoolCacheKlass::oop_adjust_pointers(oop obj) { | |
148 assert(obj->is_constantPoolCache(), "obj must be constant pool cache"); | |
149 constantPoolCacheOop cache = (constantPoolCacheOop)obj; | |
150 // Get size before changing pointers. | |
151 // Don't call size() or oop_size() since that is a virtual call. | |
152 int size = cache->object_size(); | |
153 // Performance tweak: We skip iterating over the klass pointer since we | |
154 // know that Universe::constantPoolCacheKlassObj never moves. | |
155 // Iteration over constant pool cache instance variables | |
156 MarkSweep::adjust_pointer((oop*)cache->constant_pool_addr()); | |
157 // iteration over constant pool cache entries | |
158 for (int i = 0; i < cache->length(); i++) | |
159 cache->entry_at(i)->adjust_pointers(); | |
160 return size; | |
161 } | |
162 | |
542
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
163 bool constantPoolCacheKlass::oop_is_conc_safe(oop obj) const { |
546
05c6d52fa7a9
6690928: Use spinning in combination with yields for workstealing termination.
jmasa
parents:
542
diff
changeset
|
164 assert(obj->is_constantPoolCache(), "should be constant pool"); |
542
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
165 return constantPoolCacheOop(obj)->is_conc_safe(); |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
166 } |
9a25e0c45327
6792421: assert(_bitMap->isMarked(addr+size-1),inconsistent Printezis mark)
jmasa
parents:
196
diff
changeset
|
167 |
0 | 168 #ifndef SERIALGC |
169 void constantPoolCacheKlass::oop_copy_contents(PSPromotionManager* pm, | |
170 oop obj) { | |
171 assert(obj->is_constantPoolCache(), "should be constant pool"); | |
726
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
172 if (EnableInvokeDynamic) { |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
173 constantPoolCacheOop cache = (constantPoolCacheOop)obj; |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
174 // during a scavenge, it is safe to inspect my pool, since it is perm |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
175 constantPoolOop pool = cache->constant_pool(); |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
176 assert(pool->is_constantPool(), "should be constant pool"); |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
177 if (pool->has_invokedynamic()) { |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
178 for (int i = 0; i < cache->length(); i++) { |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
179 ConstantPoolCacheEntry* e = cache->entry_at(i); |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
180 oop* p = (oop*)&e->_f1; |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
181 if (e->is_secondary_entry()) { |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
182 if (PSScavenge::should_scavenge(p)) |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
183 pm->claim_or_forward_breadth(p); |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
184 assert(!(e->is_vfinal() && PSScavenge::should_scavenge((oop*)&e->_f2)), |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
185 "no live oops here"); |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
186 } |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
187 } |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
188 } |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
189 } |
0 | 190 } |
191 | |
192 void constantPoolCacheKlass::oop_push_contents(PSPromotionManager* pm, | |
193 oop obj) { | |
194 assert(obj->is_constantPoolCache(), "should be constant pool"); | |
726
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
195 if (EnableInvokeDynamic) { |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
196 constantPoolCacheOop cache = (constantPoolCacheOop)obj; |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
197 // during a scavenge, it is safe to inspect my pool, since it is perm |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
198 constantPoolOop pool = cache->constant_pool(); |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
199 assert(pool->is_constantPool(), "should be constant pool"); |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
200 if (pool->has_invokedynamic()) { |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
201 for (int i = 0; i < cache->length(); i++) { |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
202 ConstantPoolCacheEntry* e = cache->entry_at(i); |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
203 oop* p = (oop*)&e->_f1; |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
204 if (e->is_secondary_entry()) { |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
205 if (PSScavenge::should_scavenge(p)) |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
206 pm->claim_or_forward_depth(p); |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
207 assert(!(e->is_vfinal() && PSScavenge::should_scavenge((oop*)&e->_f2)), |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
208 "no live oops here"); |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
209 } |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
210 } |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
211 } |
be93aad57795
6655646: dynamic languages need dynamically linked call sites
jrose
parents:
579
diff
changeset
|
212 } |
0 | 213 } |
214 | |
215 int | |
216 constantPoolCacheKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) { | |
217 assert(obj->is_constantPoolCache(), "obj must be constant pool cache"); | |
218 constantPoolCacheOop cache = (constantPoolCacheOop)obj; | |
219 | |
220 // Iteration over constant pool cache instance variables | |
221 PSParallelCompact::adjust_pointer((oop*)cache->constant_pool_addr()); | |
222 | |
223 // iteration over constant pool cache entries | |
224 for (int i = 0; i < cache->length(); ++i) { | |
225 cache->entry_at(i)->update_pointers(); | |
226 } | |
227 | |
228 return cache->object_size(); | |
229 } | |
230 | |
231 int | |
232 constantPoolCacheKlass::oop_update_pointers(ParCompactionManager* cm, oop obj, | |
233 HeapWord* beg_addr, | |
234 HeapWord* end_addr) { | |
235 assert(obj->is_constantPoolCache(), "obj must be constant pool cache"); | |
236 constantPoolCacheOop cache = (constantPoolCacheOop)obj; | |
237 | |
238 // Iteration over constant pool cache instance variables | |
239 oop* p; | |
240 p = (oop*)cache->constant_pool_addr(); | |
241 PSParallelCompact::adjust_pointer(p, beg_addr, end_addr); | |
242 | |
243 // Iteration over constant pool cache entries | |
244 for (int i = 0; i < cache->length(); ++i) { | |
245 cache->entry_at(i)->update_pointers(beg_addr, end_addr); | |
246 } | |
247 return cache->object_size(); | |
248 } | |
249 #endif // SERIALGC | |
250 | |
251 #ifndef PRODUCT | |
252 | |
253 void constantPoolCacheKlass::oop_print_on(oop obj, outputStream* st) { | |
254 assert(obj->is_constantPoolCache(), "obj must be constant pool cache"); | |
255 constantPoolCacheOop cache = (constantPoolCacheOop)obj; | |
256 // super print | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
257 Klass::oop_print_on(obj, st); |
0 | 258 // print constant pool cache entries |
259 for (int i = 0; i < cache->length(); i++) cache->entry_at(i)->print(st, i); | |
260 } | |
261 | |
262 #endif | |
263 | |
1155
4e6abf09f540
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
726
diff
changeset
|
264 void constantPoolCacheKlass::oop_print_value_on(oop obj, outputStream* st) { |
4e6abf09f540
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
726
diff
changeset
|
265 assert(obj->is_constantPoolCache(), "obj must be constant pool cache"); |
4e6abf09f540
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
726
diff
changeset
|
266 constantPoolCacheOop cache = (constantPoolCacheOop)obj; |
4e6abf09f540
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
726
diff
changeset
|
267 st->print("cache [%d]", cache->length()); |
4e6abf09f540
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
726
diff
changeset
|
268 cache->print_address_on(st); |
4e6abf09f540
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
726
diff
changeset
|
269 st->print(" for "); |
4e6abf09f540
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
726
diff
changeset
|
270 cache->constant_pool()->print_value_on(st); |
4e6abf09f540
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
726
diff
changeset
|
271 } |
4e6abf09f540
6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents:
726
diff
changeset
|
272 |
0 | 273 void constantPoolCacheKlass::oop_verify_on(oop obj, outputStream* st) { |
274 guarantee(obj->is_constantPoolCache(), "obj must be constant pool cache"); | |
275 constantPoolCacheOop cache = (constantPoolCacheOop)obj; | |
276 // super verify | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
277 Klass::oop_verify_on(obj, st); |
0 | 278 // print constant pool cache entries |
279 for (int i = 0; i < cache->length(); i++) cache->entry_at(i)->verify(st); | |
280 } | |
281 | |
282 | |
283 const char* constantPoolCacheKlass::internal_name() const { | |
284 return "{constant pool cache}"; | |
285 } |