hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/HeapSummary.java
changeset 33628 09241459a8b8
parent 30769 df60209aac9d
child 35065 b4ff0249c092
equal deleted inserted replaced
33627:c5b7455f846e 33628:09241459a8b8
   266 
   266 
   267          StringStat() {
   267          StringStat() {
   268             VM vm = VM.getVM();
   268             VM vm = VM.getVM();
   269             SystemDictionary sysDict = vm.getSystemDictionary();
   269             SystemDictionary sysDict = vm.getSystemDictionary();
   270             InstanceKlass strKlass = sysDict.getStringKlass();
   270             InstanceKlass strKlass = sysDict.getStringKlass();
   271             // String has a field named 'value' of type 'char[]'.
   271             // String has a field named 'value' of type 'byte[]'.
   272             stringValueField = (OopField) strKlass.findField("value", "[C");
   272             stringValueField = (OopField) strKlass.findField("value", "[B");
   273          }
   273          }
   274 
   274 
   275          private long stringSize(Instance instance) {
   275          private long stringSize(Instance instance) {
   276             // We include String content in size calculation.
   276             // We include String content in size calculation.
   277             return instance.getObjectSize() +
   277             return instance.getObjectSize() +