private HeapRegion at(long index) { Address arrayAddr = regionsField.getValue(addr); // Offset of &_region[index] long offset = index * VM.getVM().getAddressSize(); Address regionAddr = arrayAddr.getAddressAt(offset); return (HeapRegion) VMObjectFactory.newObject(HeapRegion.class, regionAddr); }
/** Breakpoint support (see methods on methodOop for details) */ public BreakpointInfo getBreakpoints() { Address addr = getHandle().getAddressAt(Oop.getHeaderSize() + breakpoints.getOffset()); return (BreakpointInfo) VMObjectFactory.newObject(BreakpointInfo.class, addr); }
// get associated compiled native method, if available, else return null. public NMethod getNativeMethod() { Address addr = code.getValue(getAddress()); return (NMethod) VMObjectFactory.newObject(NMethod.class, addr); }
public MethodCounters getMethodCounters() { Address addr = methodCounters.getValue(getAddress()); return (MethodCounters) VMObjectFactory.newObject(MethodCounters.class, addr); }
public MethodData getMethodData() { Address addr = methodData.getValue(getAddress()); return (MethodData) VMObjectFactory.newObject(MethodData.class, addr); }
// Accessors for declared fields public ConstMethod getConstMethod() { Address addr = constMethod.getValue(getAddress()); return (ConstMethod) VMObjectFactory.newObject(ConstMethod.class, addr); }