- java.lang.Object
-
- com.ibm.j9ddr.corereaders.memory.SearchableMemory
-
- com.ibm.j9ddr.corereaders.memory.AbstractMemory
-
- com.ibm.j9ddr.corereaders.memory.BufferedMemory
-
- All Implemented Interfaces:
IAddressSpace
,IMemory
,IProcess
public class BufferedMemory extends AbstractMemory implements IProcess, IAddressSpace
Object representing a single live process model where a section of memory in a the process can be represented in a byte buffer as its source- See Also:
Can be used for inspection of the scc, without the need of a core file For example in the following, it is used to inspect romMethods: BufferedMemory memory = new BufferedMemory(ByteOrder.nativeOrder()); IVMData aVMData = VMDataFactory.getVMData((IProcess)memory); //this address denotes the beginning of range of interest, not shown here memory.addMemorySource(new BufferedMemorySource(sourceStartAddress, size)); aVMData.bootstrap("com.ibm.j9ddr.vm29.SomeDebugHandler"); public class SomeDebugHandler { //can fetch this address from a ROMClass Cookie J9ROMClassPointer pointer = J9ROMClassPointer.cast(romStartAddress); J9ROMMethodPointer romMethod = pointer.romMethods(); long dumpFlags = (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN) ? 1 : 0; J9BCUtil.j9bcutil_dumpRomMethod(System.out, romMethod, pointer, dumpFlags, J9BCUtil.BCUtil_DumpAnnotations); } Behaviour of the model is not defined for the case where the underlying source's ByteBuffer is modified (address or capacity) during use.
-
-
Field Summary
-
Fields declared in class com.ibm.j9ddr.corereaders.memory.AbstractMemory
decoratorMappingTable, memorySources
-
Fields declared in class com.ibm.j9ddr.corereaders.memory.SearchableMemory
rangeTable
-
-
Constructor Summary
Constructors Constructor Description BufferedMemory(ByteOrder byteOrder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
bytesPerPointer()
IAddressSpace
getAddressSpace()
String
getCommandLine()
Properties
getEnvironmentVariables()
String
getProcedureNameForAddress(long address)
Equivalent to getProcedureNameForAddress(address, false).-
Methods declared in class com.ibm.j9ddr.corereaders.memory.AbstractMemory
addMemorySource, addMemorySources, removeMemorySource
-
Methods declared in class com.ibm.j9ddr.corereaders.memory.SearchableMemory
buildRangeTable, mergeRangeTable
-
Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods declared in interface com.ibm.j9ddr.corereaders.memory.IAddressSpace
getAddressSpaceId, getCore, getProcesses
-
Methods declared in interface com.ibm.j9ddr.corereaders.memory.IMemory
findPattern, getByteAt, getByteOrder, getBytesAt, getBytesAt, getIntAt, getLongAt, getMemoryRanges, getPlatform, getProperties, getShortAt, isExecutable, isReadOnly, isShared
-
Methods declared in interface com.ibm.j9ddr.corereaders.memory.IProcess
getExecutable, getModules, getPointerAt, getProcedureNameForAddress, getProcessId, getSignalNumber, getThreads, isFailingProcess
-
-
-
-
Constructor Detail
-
BufferedMemory
public BufferedMemory(ByteOrder byteOrder)
-
-
Method Detail
-
getAddressSpace
public IAddressSpace getAddressSpace()
- Specified by:
getAddressSpace
in interfaceIProcess
- Returns:
- Address space this process uses.
-
bytesPerPointer
public int bytesPerPointer()
- Specified by:
bytesPerPointer
in interfaceIProcess
- Returns:
- Number of bytes in a pointer
-
getCommandLine
public String getCommandLine() throws DataUnavailableException, CorruptDataException
- Specified by:
getCommandLine
in interfaceIProcess
- Returns:
- Process command line or null if the data is unavailable
- Throws:
CorruptDataException
DataUnavailableException
-
getEnvironmentVariables
public Properties getEnvironmentVariables() throws DataUnavailableException, CorruptDataException
- Specified by:
getEnvironmentVariables
in interfaceIProcess
- Returns:
- Properties containing environment variables name=value pairs
- Throws:
CorruptDataException
DataUnavailableException
-
getProcedureNameForAddress
public String getProcedureNameForAddress(long address) throws DataUnavailableException, CorruptDataException
Equivalent to getProcedureNameForAddress(address, false). Default behaviour is to return DDR format strings for symbols.- Specified by:
getProcedureNameForAddress
in interfaceIProcess
- Throws:
DataUnavailableException
CorruptDataException
-
-