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
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, memorySourcesFields declared in class com.ibm.j9ddr.corereaders.memory.SearchableMemory
rangeTable -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintgetCore()The core file from which this address space has been created fromCollection<? extends IModule>longgetPointerAt(long address) getProcedureNameForAddress(long address) Equivalent to getProcedureNameForAddress(address, false).getProcedureNameForAddress(long address, boolean dtfjFormat) longintCollection<? extends IOSThread>booleanMethods declared in class com.ibm.j9ddr.corereaders.memory.AbstractMemory
addMemorySource, addMemorySources, getByteAt, getByteOrder, getBytesAt, getBytesAt, getIntAt, getLongAt, getMemoryRanges, getProperties, getShortAt, isExecutable, isReadOnly, isShared, removeMemorySourceMethods declared in class com.ibm.j9ddr.corereaders.memory.SearchableMemory
buildRangeTable, findPattern, mergeRangeTableMethods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods declared in interface com.ibm.j9ddr.corereaders.memory.IMemory
findPattern, getByteAt, getByteOrder, getBytesAt, getBytesAt, getIntAt, getLongAt, getMemoryRanges, getProperties, getShortAt, isExecutable, isReadOnly, isShared
-
Constructor Details
-
BufferedMemory
-
-
Method Details
-
getPlatform
- Specified by:
getPlatformin interfaceIMemory
-
getAddressSpace
- Specified by:
getAddressSpacein interfaceIProcess- Returns:
- Address space this process uses.
-
getPointerAt
- Specified by:
getPointerAtin interfaceIProcess- Throws:
MemoryFault
-
bytesPerPointer
public int bytesPerPointer()- Specified by:
bytesPerPointerin interfaceIProcess- Returns:
- Number of bytes in a pointer
-
getCommandLine
- Specified by:
getCommandLinein interfaceIProcess- Returns:
- Process command line or null if the data is unavailable
- Throws:
CorruptDataExceptionDataUnavailableException
-
getEnvironmentVariables
- Specified by:
getEnvironmentVariablesin interfaceIProcess- Returns:
- Properties containing environment variables name=value pairs
- Throws:
CorruptDataExceptionDataUnavailableException
-
getModules
- Specified by:
getModulesin interfaceIProcess- Throws:
CorruptDataException
-
getExecutable
- Specified by:
getExecutablein interfaceIProcess- Throws:
CorruptDataException
-
getProcessId
- Specified by:
getProcessIdin interfaceIProcess- Throws:
CorruptDataException
-
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:
getProcedureNameForAddressin interfaceIProcess- Throws:
DataUnavailableExceptionCorruptDataException
-
getProcedureNameForAddress
public String getProcedureNameForAddress(long address, boolean dtfjFormat) throws DataUnavailableException, CorruptDataException - Specified by:
getProcedureNameForAddressin interfaceIProcess- Throws:
DataUnavailableExceptionCorruptDataException
-
getThreads
- Specified by:
getThreadsin interfaceIProcess- Throws:
CorruptDataException
-
getSignalNumber
- Specified by:
getSignalNumberin interfaceIProcess- Throws:
DataUnavailableException
-
isFailingProcess
- Specified by:
isFailingProcessin interfaceIProcess- Throws:
DataUnavailableException
-
getCore
Description copied from interface:IAddressSpaceThe core file from which this address space has been created from- Specified by:
getCorein interfaceIAddressSpace- Returns:
- the core file or null if this address space is not backed by an underlying core file
-
getProcesses
- Specified by:
getProcessesin interfaceIAddressSpace- Returns:
- List of processes using this address space.
-
getAddressSpaceId
public int getAddressSpaceId()- Specified by:
getAddressSpaceIdin interfaceIAddressSpace- Returns:
- Numeric ID of address space.
-