< prev index next >

agent/src/share/classes/sun/jvm/hotspot/tools/HeapSummary.java

Print this page

        

*** 266,277 **** StringStat() { VM vm = VM.getVM(); SystemDictionary sysDict = vm.getSystemDictionary(); InstanceKlass strKlass = sysDict.getStringKlass(); ! // String has a field named 'value' of type 'char[]'. ! stringValueField = (OopField) strKlass.findField("value", "[C"); } private long stringSize(Instance instance) { // We include String content in size calculation. return instance.getObjectSize() + --- 266,277 ---- StringStat() { VM vm = VM.getVM(); SystemDictionary sysDict = vm.getSystemDictionary(); InstanceKlass strKlass = sysDict.getStringKlass(); ! // String has a field named 'value' of type 'byte[]'. ! stringValueField = (OopField) strKlass.findField("value", "[B"); } private long stringSize(Instance instance) { // We include String content in size calculation. return instance.getObjectSize() +
< prev index next >