< prev index next >

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/Klass.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 59,78 **** --- 59,80 ---- traceIDField = type.getField("_trace_id"); } catch(Exception e) { } subklass = new MetadataField(type.getAddressField("_subklass"), 0); nextSibling = new MetadataField(type.getAddressField("_next_sibling"), 0); + vtableLen = new CIntField(type.getCIntegerField("_vtable_len"), 0); LH_INSTANCE_SLOW_PATH_BIT = db.lookupIntConstant("Klass::_lh_instance_slow_path_bit").intValue(); LH_LOG2_ELEMENT_SIZE_SHIFT = db.lookupIntConstant("Klass::_lh_log2_element_size_shift").intValue(); LH_ELEMENT_TYPE_SHIFT = db.lookupIntConstant("Klass::_lh_element_type_shift").intValue(); LH_HEADER_SIZE_SHIFT = db.lookupIntConstant("Klass::_lh_header_size_shift").intValue(); LH_ARRAY_TAG_SHIFT = db.lookupIntConstant("Klass::_lh_array_tag_shift").intValue(); LH_ARRAY_TAG_TYPE_VALUE = db.lookupIntConstant("Klass::_lh_array_tag_type_value").intValue(); LH_ARRAY_TAG_OBJ_VALUE = db.lookupIntConstant("Klass::_lh_array_tag_obj_value").intValue(); } + public Klass(Address addr) { super(addr); } // jvmdi support - see also class_status in VM code
*** 89,98 **** --- 91,101 ---- private static AddressField name; private static CIntField accessFlags; private static MetadataField subklass; private static MetadataField nextSibling; private static sun.jvm.hotspot.types.Field traceIDField; + private static CIntField vtableLen; private Address getValue(AddressField field) { return addr.getAddressAt(field.getOffset()); }
*** 109,118 **** --- 112,122 ---- public long getAccessFlags() { return accessFlags.getValue(this); } // Convenience routine public AccessFlags getAccessFlagsObj(){ return new AccessFlags(getAccessFlags()); } public Klass getSubklassKlass() { return (Klass) subklass.getValue(this); } public Klass getNextSiblingKlass() { return (Klass) nextSibling.getValue(this); } + public long getVtableLen() { return vtableLen.getValue(this); } public long traceID() { if (traceIDField == null) return 0; return traceIDField.getJLong(addr); }
*** 177,186 **** --- 181,191 ---- visitor.doInt(layoutHelper, true); // visitor.doOop(name, true); visitor.doCInt(accessFlags, true); visitor.doMetadata(subklass, true); visitor.doMetadata(nextSibling, true); + visitor.doCInt(vtableLen, true); } public long getObjectSize() { throw new RuntimeException("should not reach here"); }
< prev index next >