< prev index next >

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

Print this page

*** 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. --- 1,7 ---- /* ! * Copyright (c) 2000, 2017, 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.
*** 82,93 **** tags = type.getAddressField("_tags"); operands = type.getAddressField("_operands"); cache = type.getAddressField("_cache"); poolHolder = new MetadataField(type.getAddressField("_pool_holder"), 0); length = new CIntField(type.getCIntegerField("_length"), 0); - resolvedReferences = type.getAddressField("_resolved_references"); - referenceMap = type.getAddressField("_reference_map"); headerSize = type.getSize(); elementSize = 0; // fetch constants: INDY_BSM_OFFSET = db.lookupIntConstant("ConstantPool::_indy_bsm_offset").intValue(); INDY_ARGC_OFFSET = db.lookupIntConstant("ConstantPool::_indy_argc_offset").intValue(); --- 82,91 ----
*** 103,114 **** private static AddressField tags; private static AddressField operands; private static AddressField cache; private static MetadataField poolHolder; private static CIntField length; // number of elements in oop - private static AddressField resolvedReferences; - private static AddressField referenceMap; private static long headerSize; private static long elementSize; private static int INDY_BSM_OFFSET; --- 101,110 ----
*** 122,142 **** return (ConstantPoolCache) VMObjectFactory.newObject(ConstantPoolCache.class, addr); } public InstanceKlass getPoolHolder() { return (InstanceKlass)poolHolder.getValue(this); } public int getLength() { return (int)length.getValue(getAddress()); } public Oop getResolvedReferences() { ! Address handle = resolvedReferences.getValue(getAddress()); ! if (handle != null) { ! // Load through the handle ! OopHandle refs = handle.getOopHandleAt(0); ! return VM.getVM().getObjectHeap().newOop(refs); ! } ! return null; } public U2Array referenceMap() { ! return new U2Array(referenceMap.getValue(getAddress())); } public int objectToCPIndex(int index) { return referenceMap().at(index); } --- 118,132 ---- return (ConstantPoolCache) VMObjectFactory.newObject(ConstantPoolCache.class, addr); } public InstanceKlass getPoolHolder() { return (InstanceKlass)poolHolder.getValue(this); } public int getLength() { return (int)length.getValue(getAddress()); } public Oop getResolvedReferences() { ! return getCache().getResolvedReferences(); } public U2Array referenceMap() { ! return getCache().referenceMap(); } public int objectToCPIndex(int index) { return referenceMap().at(index); }
< prev index next >