Package sun.jvm.hotspot.oops

Examples of sun.jvm.hotspot.oops.InstanceKlass


            }

            if (exactMallocMode || verbose) {
                final long pageSize = getStaticIntFieldValue("java.nio.Bits", "pageSize");
                ObjectHeap heap = VM.getVM().getObjectHeap();
                InstanceKlass deallocatorKlass = SystemDictionaryHelper
                        .findInstanceKlass("java.nio.DirectByteBuffer$Deallocator");
                final LongField addressField = (LongField) deallocatorKlass.findField("address", "J");
                final IntField capacityField = (IntField) deallocatorKlass.findField("capacity", "I");
                final int[] countHolder = new int[1];

                heap.iterateObjectsOfKlass(new DefaultHeapVisitor() {
                    public boolean doObj(Oop oop) {
                        long address = addressField.getValue(oop);
View Full Code Here


            e.printStackTrace();
        }
    }

    public static long getStaticLongFieldValue(String className, String fieldName) {
        InstanceKlass klass = SystemDictionaryHelper.findInstanceKlass(className);
        LongField field = (LongField) klass.findField(fieldName, "J");
        return field.getValue(klass);
    }
View Full Code Here

        LongField field = (LongField) klass.findField(fieldName, "J");
        return field.getValue(klass);
    }

    public static int getStaticIntFieldValue(String className, String fieldName) {
        InstanceKlass klass = SystemDictionaryHelper.findInstanceKlass(className);
        IntField field = (IntField) klass.findField(fieldName, "I");
        return field.getValue(klass);
    }
View Full Code Here

    // includeSubtypes - do you want to include subclass/subtype instances of given
    // ReferenceType or do we want objects of exact type only?
    public List/*<ObjectReference>*/ objectsByType(ReferenceType type, boolean includeSubtypes) {
        Klass kls = ((ReferenceTypeImpl)type).ref();
        if (kls instanceof InstanceKlass) {
            InstanceKlass ik = (InstanceKlass) kls;
            // if the Klass is final or if there are no subklasses loaded yet
            if (ik.getAccessFlagsObj().isFinal() || ik.getSubklassKlass() == null) {
                includeSubtypes = false;
            }
        } else {
            // no subtypes for primitive array types
            ArrayTypeImpl arrayType = (ArrayTypeImpl) type;
View Full Code Here

    protected ClassTypeImpl(VirtualMachine aVm, InstanceKlass aRef) {
        super(aVm, aRef);
    }

    public ClassType superclass() {
        InstanceKlass kk = (InstanceKlass)ref().getSuper();
        if (kk == null) {
            return null;
        }
        return (ClassType) vm.referenceType(kk);
    }
View Full Code Here

    // includeSubtypes - do you want to include subclass/subtype instances of given
    // ReferenceType or do we want objects of exact type only?
    public List/*<ObjectReference>*/ objectsByType(ReferenceType type, boolean includeSubtypes) {
        Klass kls = ((ReferenceTypeImpl)type).ref();
        if (kls instanceof InstanceKlass) {
            InstanceKlass ik = (InstanceKlass) kls;
            if (ik.isInterface()) {
                if (ik.nofImplementors() == 0L) {
                    return new ArrayList(0);
                }
            } else {
                // if the Klass is final or if there are no subklasses loaded yet
                if (ik.getAccessFlagsObj().isFinal() || ik.getSubklassKlass() == null) {
                    includeSubtypes = false;
                }
            }
        } else {
            // no subtypes for primitive array types
View Full Code Here

    // includeSubtypes - do you want to include subclass/subtype instances of given
    // ReferenceType or do we want objects of exact type only?
    public List/*<ObjectReference>*/ objectsByType(ReferenceType type, boolean includeSubtypes) {
        Klass kls = ((ReferenceTypeImpl)type).ref();
        if (kls instanceof InstanceKlass) {
            InstanceKlass ik = (InstanceKlass) kls;
            if (ik.isInterface()) {
                if (ik.nofImplementors() == 0L) {
                    return new ArrayList(0);
                }
            } else {
                // if the Klass is final or if there are no subklasses loaded yet
                if (ik.getAccessFlagsObj().isFinal() || ik.getSubklassKlass() == null) {
                    includeSubtypes = false;
                }
            }
        } else {
            // no subtypes for primitive array types
View Full Code Here

TOP

Related Classes of sun.jvm.hotspot.oops.InstanceKlass

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.