Mercurial > hg > graal-compiler
comparison agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java @ 2177:3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
Summary: move symbols from permgen into C heap and reference count them
Reviewed-by: never, acorn, jmasa, stefank
author | coleenp |
---|---|
date | Thu, 27 Jan 2011 16:11:27 -0800 |
parents | 3da13a976363 |
children | 1d1603768966 ed69575596ac |
comparison
equal
deleted
inserted
replaced
2176:27e4ea99855d | 2177:3582bf76420e |
---|---|
528 buf.cell(cpool.getSymbolAt(index).asString()); | 528 buf.cell(cpool.getSymbolAt(index).asString()); |
529 break; | 529 break; |
530 | 530 |
531 case JVM_CONSTANT_Class: | 531 case JVM_CONSTANT_Class: |
532 buf.cell("JVM_CONSTANT_Class"); | 532 buf.cell("JVM_CONSTANT_Class"); |
533 Klass klass = (Klass) cpool.getObjAt(index); | 533 Klass klass = (Klass) cpool.getObjAtRaw(index); |
534 if (klass instanceof InstanceKlass) { | 534 if (klass instanceof InstanceKlass) { |
535 buf.cell(genKlassLink((InstanceKlass) klass)); | 535 buf.cell(genKlassLink((InstanceKlass) klass)); |
536 } else { | 536 } else { |
537 buf.cell(klass.getName().asString().replace('/', '.')); | 537 buf.cell(klass.getName().asString().replace('/', '.')); |
538 } | 538 } |
553 break; | 553 break; |
554 | 554 |
555 case JVM_CONSTANT_String: | 555 case JVM_CONSTANT_String: |
556 buf.cell("JVM_CONSTANT_String"); | 556 buf.cell("JVM_CONSTANT_String"); |
557 buf.cell("\"" + | 557 buf.cell("\"" + |
558 escapeHTMLSpecialChars(OopUtilities.stringOopToString(cpool.getObjAt(index))) + "\""); | 558 escapeHTMLSpecialChars(OopUtilities.stringOopToString(cpool.getObjAtRaw(index))) + "\""); |
559 break; | 559 break; |
560 | 560 |
561 case JVM_CONSTANT_Fieldref: | 561 case JVM_CONSTANT_Fieldref: |
562 buf.cell("JVM_CONSTANT_Fieldref"); | 562 buf.cell("JVM_CONSTANT_Fieldref"); |
563 buf.cell(genLowHighShort(cpool.getIntAt(index))); | 563 buf.cell(genLowHighShort(cpool.getIntAt(index))); |
670 buf.h3("Checked Exception(s)"); | 670 buf.h3("Checked Exception(s)"); |
671 CheckedExceptionElement[] exceptions = method.getCheckedExceptions(); | 671 CheckedExceptionElement[] exceptions = method.getCheckedExceptions(); |
672 buf.beginTag("ul"); | 672 buf.beginTag("ul"); |
673 for (int exp = 0; exp < exceptions.length; exp++) { | 673 for (int exp = 0; exp < exceptions.length; exp++) { |
674 short cpIndex = (short) exceptions[exp].getClassCPIndex(); | 674 short cpIndex = (short) exceptions[exp].getClassCPIndex(); |
675 Oop obj = cpool.getObjAt(cpIndex); | 675 ConstantPool.CPSlot obj = cpool.getSlotAt(cpIndex); |
676 if (obj instanceof Symbol) { | 676 if (obj.isMetaData()) { |
677 buf.li(((Symbol)obj).asString().replace('/', '.')); | 677 buf.li((obj.getSymbol()).asString().replace('/', '.')); |
678 } else { | 678 } else { |
679 buf.li(genKlassLink((InstanceKlass)obj)); | 679 buf.li(genKlassLink((InstanceKlass)obj.getOop())); |
680 } | 680 } |
681 } | 681 } |
682 buf.endTag("ul"); | 682 buf.endTag("ul"); |
683 } | 683 } |
684 | 684 |
754 buf.link(genKlassHref(klass), genKlassTitle(klass)); | 754 buf.link(genKlassHref(klass), genKlassTitle(klass)); |
755 } | 755 } |
756 } else if (instr instanceof BytecodeLoadConstant) { | 756 } else if (instr instanceof BytecodeLoadConstant) { |
757 BytecodeLoadConstant ldc = (BytecodeLoadConstant) instr; | 757 BytecodeLoadConstant ldc = (BytecodeLoadConstant) instr; |
758 if (ldc.isKlassConstant()) { | 758 if (ldc.isKlassConstant()) { |
759 Oop oop = ldc.getKlass(); | 759 Object oop = ldc.getKlass(); |
760 if (oop instanceof Klass) { | 760 if (oop instanceof Klass) { |
761 buf.append("<a href='"); | 761 buf.append("<a href='"); |
762 buf.append(genKlassHref((InstanceKlass) oop)); | 762 buf.append(genKlassHref((InstanceKlass) oop)); |
763 buf.append("'>"); | 763 buf.append("'>"); |
764 buf.append(instrStr); | 764 buf.append(instrStr); |
801 buf.beginTag("tr"); | 801 buf.beginTag("tr"); |
802 buf.cell(Integer.toString(exceptionTable.getIntAt(e))); | 802 buf.cell(Integer.toString(exceptionTable.getIntAt(e))); |
803 buf.cell(Integer.toString(exceptionTable.getIntAt(e + 1))); | 803 buf.cell(Integer.toString(exceptionTable.getIntAt(e + 1))); |
804 buf.cell(Integer.toString(exceptionTable.getIntAt(e + 2))); | 804 buf.cell(Integer.toString(exceptionTable.getIntAt(e + 2))); |
805 short cpIndex = (short) exceptionTable.getIntAt(e + 3); | 805 short cpIndex = (short) exceptionTable.getIntAt(e + 3); |
806 Oop obj = cpIndex == 0? null : cpool.getObjAt(cpIndex); | 806 ConstantPool.CPSlot obj = cpIndex == 0? null : cpool.getSlotAt(cpIndex); |
807 if (obj == null) { | 807 if (obj == null) { |
808 buf.cell("Any"); | 808 buf.cell("Any"); |
809 } else if (obj instanceof Symbol) { | 809 } else if (obj.isMetaData()) { |
810 buf.cell(((Symbol)obj).asString().replace('/', '.')); | 810 buf.cell(obj.getSymbol().asString().replace('/', '.')); |
811 } else { | 811 } else { |
812 buf.cell(genKlassLink((InstanceKlass)obj)); | 812 buf.cell(genKlassLink((InstanceKlass)obj.getOop())); |
813 } | 813 } |
814 buf.endTag("tr"); | 814 buf.endTag("tr"); |
815 } | 815 } |
816 | 816 |
817 buf.endTable(); | 817 buf.endTable(); |