java.lang.Object
com.ibm.dtfj.image.j9.ImageProcess
- All Implemented Interfaces:
ImageProcess
- Direct Known Subclasses:
PartialProcess
-
Constructor Summary
ConstructorsConstructorDescriptionImageProcess(String pid, String commandLine, Properties environment, ImageThread currentThread, Iterator threads, ImageModule executable, Iterator libraries, int pointerSize) -
Method Summary
Modifier and TypeMethodDescriptionvoidFetch the command line for this process.Find the thread which triggered the creation of the imageGet the environment variables for this process.Get the module representing the executable within the image.getID()Get the system-wide identifier for the process.Get the set of shared libraries which are loaded in this process.intDetermine the pointer size used by this process.Gets the OS specific properties for this process.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.intGet the OS signal number in this process which triggered the creation of this image.Get the set of image threads in the image.voidCalled if the early extraction of the data from the meta-data and core file failed in some unrecoverable way.protected voidsetCurrentThread(ImageThread thread) voidsetFaultingThreadID(long nativeID) voidsetSignalNumber(int signalNumber) TODO: REMOVE THIS once there is a reliable way to find signal numbers from ImageThreads on all platforms!protected voidsetThreads(Iterator threads)
-
Constructor Details
-
ImageProcess
public ImageProcess(String pid, String commandLine, Properties environment, ImageThread currentThread, Iterator threads, ImageModule executable, Iterator libraries, int pointerSize)
-
-
Method Details
-
getCommandLine
Description copied from interface:ImageProcessFetch the command line for this process. This may be the exact command line the user issued, or it may be a reconstructed command line based on argv[] and argc.- Specified by:
getCommandLinein interfaceImageProcess- Returns:
- the command line for the process
- Throws:
DataUnavailable- if the information cannot be providedCorruptDataException
-
getEnvironment
Description copied from interface:ImageProcessGet the environment variables for this process.- Specified by:
getEnvironmentin interfaceImageProcess- Returns:
- the environment variables for this process
- Throws:
DataUnavailable- if the information cannot be providedCorruptDataException
-
getID
Description copied from interface:ImageProcessGet the system-wide identifier for the process.- Specified by:
getIDin 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:ImageProcessGet the set of shared libraries which are loaded in this process.- Specified by:
getLibrariesin 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:
-
getExecutable
Description copied from interface:ImageProcessGet the module representing the executable within the image.- Specified by:
getExecutablein 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:
-
getThreads
Description copied from interface:ImageProcessGet the set of image threads in the image.- Specified by:
getThreadsin 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:
-
getCurrentThread
Description copied from interface:ImageProcessFind the thread which triggered the creation of the image- Specified by:
getCurrentThreadin interfaceImageProcess- Returns:
- the ImageThread which caused the image to be created, or null if the image was not created due to a specific thread
- Throws:
CorruptDataException- See Also:
-
getRuntimes
Description copied from interface:ImageProcessGet the set of the known ManagedRuntime environments in the image.- Specified by:
getRuntimesin 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:
-
getSignalNumber
Description copied from interface:ImageProcessGet the OS signal number in this process which triggered the creation of this image.- Specified by:
getSignalNumberin 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
-
getSignalName
Description copied from interface:ImageProcessGet the name of the OS signal in this process which triggered the creation of this image.- Specified by:
getSignalNamein 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
-
getPointerSize
public int getPointerSize()Description copied from interface:ImageProcessDetermine 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:
getPointerSizein interfaceImageProcess- Returns:
- the size of a pointer, in bits
-
addRuntime
-
setFaultingThreadID
public void setFaultingThreadID(long nativeID) -
setSignalNumber
public void setSignalNumber(int signalNumber) TODO: REMOVE THIS once there is a reliable way to find signal numbers from ImageThreads on all platforms!- Parameters:
signalNumber-
-
runtimeExtractionFailed
Called if the early extraction of the data from the meta-data and core file failed in some unrecoverable way. If this is called it essentially means that we are stuck in native Image data and can't describe anything from the Java side.- Parameters:
e- The exception which caused the failure
-
setThreads
-
setCurrentThread
-
getProperties
Description copied from interface:ImageProcessGets the OS specific properties for this process.- Specified by:
getPropertiesin interfaceImageProcess- Returns:
- a set of OS specific properties
-