java.lang.Object
com.ibm.j9ddr.view.dtfj.image.J9DDRImageProcess
- All Implemented Interfaces:
ImageProcess
Adapter for DDR IProcesses to make them implement the ImageProcess
API
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThis method tries to get command line of the program that generated core file.This method returns the ImageThread that matches the TID stored in the J9RAS data structure, or case 1: if no J9RAS structure available return null case 2: if J9RAS structure available but no TID field (old JVMs, old jextract behaviour) - return the first thread, or null if no threads case 3: if J9RAS structure available with TID field but TID is zero (eg dump triggered outside JVM) - platform specific code if core readers have identified a current thread, else...This method gets the environment variables.Get the module representing the executable within the image.getID()
Get the system-wide identifier for the process.Iterator<?>
Get the set of shared libraries which are loaded in this process.int
Determine the pointer size used by this process.Gets the OS specific properties for this process.Iterator<?>
Get the set of the known ManagedRuntime environments in the image.Get the name of the OS signal in this process which triggered the creation of this image.int
Get the OS signal number in this process which triggered the creation of this image.getThread
(long id) Iterator<?>
Get the set of image threads in the image.Return the build version (e.g. 29) of the first VM in the process (useful for testing).
-
Constructor Details
-
J9DDRImageProcess
-
-
Method Details
-
getIProcess
-
getCommandLine
This method tries to get command line of the program that generated core file. We can't get the command line from the core dump on zOS, or on recent Windows versions. On Linux it may be truncated. The java launcher stores the command line in an environment variable, so for all platforms we now try that first, with the core reader as a fallback.- Specified by:
getCommandLine
in interfaceImageProcess
- Returns:
- String instance of the commandline
- Throws:
DataUnavailable
CorruptDataException
-
getCurrentThread
This method returns the ImageThread that matches the TID stored in the J9RAS data structure, or case 1: if no J9RAS structure available return null case 2: if J9RAS structure available but no TID field (old JVMs, old jextract behaviour) - return the first thread, or null if no threads case 3: if J9RAS structure available with TID field but TID is zero (eg dump triggered outside JVM) - platform specific code if core readers have identified a current thread, else... case 4: if J9RAS structure available with TID field but no match (eg Linux), return a stub ImageThread- Specified by:
getCurrentThread
in interfaceImageProcess
- Returns:
- ImageThread
- Throws:
CorruptDataException
- See Also:
-
getEnvironment
This method gets the environment variables. First it tries to extract it from RAS structure. If not, it tries to get it from loaded modules.- Specified by:
getEnvironment
in interfaceImageProcess
- Returns:
- Properties instance of environment variables.
- Throws:
DataUnavailable
CorruptDataException
-
getExecutable
Description copied from interface:ImageProcess
Get the module representing the executable within the image.- Specified by:
getExecutable
in interfaceImageProcess
- Returns:
- the module representing the executable within the image (as opposed to modules representing libraries)
- Throws:
DataUnavailable
- if the information cannot be providedCorruptDataException
- See Also:
-
getID
Description copied from interface:ImageProcess
Get the system-wide identifier for the process.- Specified by:
getID
in interfaceImageProcess
- Returns:
- a system-wide identifier for the process (e.g. a process id (pid) on Unix like systems)
- Throws:
DataUnavailable
- if the information cannot be providedCorruptDataException
-
getLibraries
Description copied from interface:ImageProcess
Get the set of shared libraries which are loaded in this process.- Specified by:
getLibraries
in interfaceImageProcess
- Returns:
- an iterator to iterate over the shared libraries which are loaded in this process
- Throws:
DataUnavailable
- if the information cannot be providedCorruptDataException
- See Also:
-
getPointerSize
public int getPointerSize()Description copied from interface:ImageProcess
Determine the pointer size used by this process. Currently supported values are 31, 32 or 64. In the future, other pointer sizes may also be supported.- Specified by:
getPointerSize
in interfaceImageProcess
- Returns:
- the size of a pointer, in bits
-
getRuntimes
Description copied from interface:ImageProcess
Get the set of the known ManagedRuntime environments in the image.- Specified by:
getRuntimes
in interfaceImageProcess
- Returns:
- an iterator to iterate over all of the known ManagedRuntime environments in the image. In a typical image, there will be only one runtime, and it will be an instance of JavaRuntime. However any user of this API should be aware that there is a possibility that other runtimes may exist in the image
- See Also:
-
getSignalName
Description copied from interface:ImageProcess
Get the name of the OS signal in this process which triggered the creation of this image.- Specified by:
getSignalName
in interfaceImageProcess
- Returns:
- the name of the OS signal in this process which triggered the creation of this image, or null if the image was not created because of a signal in this process
- Throws:
DataUnavailable
- if the information cannot be providedCorruptDataException
-
getSignalNumber
Description copied from interface:ImageProcess
Get the OS signal number in this process which triggered the creation of this image.- Specified by:
getSignalNumber
in interfaceImageProcess
- Returns:
- the OS signal number in this process which triggered the creation of this image, or 0 if the image was not created because of a signal in this process
- Throws:
DataUnavailable
- if the information cannot be providedCorruptDataException
-
getThreads
Description copied from interface:ImageProcess
Get the set of image threads in the image.- Specified by:
getThreads
in interfaceImageProcess
- Returns:
- an iterator to iterate over each ImageThread in the image There is not necessarily any relationship between JavaThreads and ImageThreads. A JVM implementation may use an n:m mapping of JavaThreads to ImageThreads, and not all ImageThreads are necessarily attached.
- See Also:
-
getThread
-
getVersion
Return the build version (e.g. 29) of the first VM in the process (useful for testing). Would be nice if DTFJJavaRuntime could implement this method, but that would be complicated as there are multiple version-packaged DTFJJavaRuntimes (e.g. j9ddr.vmxx.view.dtfj.java.DTFJJavaRunTime) and tests are not version-packaged. -
getProperties
Description copied from interface:ImageProcess
Gets the OS specific properties for this process.- Specified by:
getProperties
in interfaceImageProcess
- Returns:
- a set of OS specific properties
-