246 } |
246 } |
247 return cache->object_size(); |
247 return cache->object_size(); |
248 } |
248 } |
249 #endif // SERIALGC |
249 #endif // SERIALGC |
250 |
250 |
251 #ifndef PRODUCT |
|
252 |
|
253 void constantPoolCacheKlass::oop_print_on(oop obj, outputStream* st) { |
251 void constantPoolCacheKlass::oop_print_on(oop obj, outputStream* st) { |
254 assert(obj->is_constantPoolCache(), "obj must be constant pool cache"); |
252 assert(obj->is_constantPoolCache(), "obj must be constant pool cache"); |
255 constantPoolCacheOop cache = (constantPoolCacheOop)obj; |
253 constantPoolCacheOop cache = (constantPoolCacheOop)obj; |
256 // super print |
254 // super print |
257 Klass::oop_print_on(obj, st); |
255 Klass::oop_print_on(obj, st); |
258 // print constant pool cache entries |
256 // print constant pool cache entries |
259 for (int i = 0; i < cache->length(); i++) cache->entry_at(i)->print(st, i); |
257 for (int i = 0; i < cache->length(); i++) cache->entry_at(i)->print(st, i); |
260 } |
258 } |
261 |
259 |
262 #endif |
|
263 |
|
264 void constantPoolCacheKlass::oop_print_value_on(oop obj, outputStream* st) { |
260 void constantPoolCacheKlass::oop_print_value_on(oop obj, outputStream* st) { |
265 assert(obj->is_constantPoolCache(), "obj must be constant pool cache"); |
261 assert(obj->is_constantPoolCache(), "obj must be constant pool cache"); |
266 constantPoolCacheOop cache = (constantPoolCacheOop)obj; |
262 constantPoolCacheOop cache = (constantPoolCacheOop)obj; |
267 st->print("cache [%d]", cache->length()); |
263 st->print("cache [%d]", cache->length()); |
268 cache->print_address_on(st); |
264 cache->print_address_on(st); |