< prev index next >

src/hotspot/share/oops/constantPool.cpp

Print this page




2473             int arg = invoke_dynamic_argument_index_at(index, arg_i);
2474             st->print((arg_i == 0 ? " arguments={%d" : ", %d"), arg);
2475           }
2476           st->print("}");
2477         }
2478       }
2479       break;
2480     default:
2481       ShouldNotReachHere();
2482       break;
2483   }
2484   st->cr();
2485 }
2486 
2487 void ConstantPool::print_value_on(outputStream* st) const {
2488   assert(is_constantPool(), "must be constantPool");
2489   st->print("constant pool [%d]", length());
2490   if (has_preresolution()) st->print("/preresolution");
2491   if (operands() != NULL)  st->print("/operands[%d]", operands()->length());
2492   print_address_on(st);

2493   st->print(" for ");
2494   pool_holder()->print_value_on(st);
2495   if (pool_holder() != NULL) {
2496     bool extra = (pool_holder()->constants() != this);
2497     if (extra)  st->print(" (extra)");
2498   }
2499   if (cache() != NULL) {
2500     st->print(" cache=" PTR_FORMAT, p2i(cache()));
2501   }
2502 }
2503 
2504 #if INCLUDE_SERVICES
2505 // Size Statistics
2506 void ConstantPool::collect_statistics(KlassSizeStats *sz) const {
2507   sz->_cp_all_bytes += (sz->_cp_bytes          = sz->count(this));
2508   sz->_cp_all_bytes += (sz->_cp_tags_bytes     = sz->count_array(tags()));
2509   sz->_cp_all_bytes += (sz->_cp_cache_bytes    = sz->count(cache()));
2510   sz->_cp_all_bytes += (sz->_cp_operands_bytes = sz->count_array(operands()));
2511   sz->_cp_all_bytes += (sz->_cp_refmap_bytes   = sz->count_array(reference_map()));
2512 
2513   sz->_ro_bytes += sz->_cp_operands_bytes + sz->_cp_tags_bytes +
2514                    sz->_cp_refmap_bytes;
2515   sz->_rw_bytes += sz->_cp_bytes + sz->_cp_cache_bytes;




2473             int arg = invoke_dynamic_argument_index_at(index, arg_i);
2474             st->print((arg_i == 0 ? " arguments={%d" : ", %d"), arg);
2475           }
2476           st->print("}");
2477         }
2478       }
2479       break;
2480     default:
2481       ShouldNotReachHere();
2482       break;
2483   }
2484   st->cr();
2485 }
2486 
2487 void ConstantPool::print_value_on(outputStream* st) const {
2488   assert(is_constantPool(), "must be constantPool");
2489   st->print("constant pool [%d]", length());
2490   if (has_preresolution()) st->print("/preresolution");
2491   if (operands() != NULL)  st->print("/operands[%d]", operands()->length());
2492   print_address_on(st);
2493   if (pool_holder() != NULL) {
2494     st->print(" for ");
2495     pool_holder()->print_value_on(st);

2496     bool extra = (pool_holder()->constants() != this);
2497     if (extra)  st->print(" (extra)");
2498   }
2499   if (cache() != NULL) {
2500     st->print(" cache=" PTR_FORMAT, p2i(cache()));
2501   }
2502 }
2503 
2504 #if INCLUDE_SERVICES
2505 // Size Statistics
2506 void ConstantPool::collect_statistics(KlassSizeStats *sz) const {
2507   sz->_cp_all_bytes += (sz->_cp_bytes          = sz->count(this));
2508   sz->_cp_all_bytes += (sz->_cp_tags_bytes     = sz->count_array(tags()));
2509   sz->_cp_all_bytes += (sz->_cp_cache_bytes    = sz->count(cache()));
2510   sz->_cp_all_bytes += (sz->_cp_operands_bytes = sz->count_array(operands()));
2511   sz->_cp_all_bytes += (sz->_cp_refmap_bytes   = sz->count_array(reference_map()));
2512 
2513   sz->_ro_bytes += sz->_cp_operands_bytes + sz->_cp_tags_bytes +
2514                    sz->_cp_refmap_bytes;
2515   sz->_rw_bytes += sz->_cp_bytes + sz->_cp_cache_bytes;


< prev index next >