- java.lang.Object
-
- com.ibm.j9ddr.view.dtfj.image.J9DDRImageProcess
-
- All Implemented Interfaces:
ImageProcess
public class J9DDRImageProcess extends Object implements ImageProcess
Adapter for DDR IProcesses to make them implement the ImageProcess API
-
-
Constructor Summary
Constructors Constructor Description J9DDRImageProcess(IProcess thisProcess)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCommandLine()
This method tries to get command line of the program that generated core file.ImageThread
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...Properties
getEnvironment()
This method gets the environment variables.IProcess
getIProcess()
J9DDRBaseImageThread
getThread(long id)
String
getVersion()
Return the build version (e.g. 29) of the first VM in the process (useful for testing).-
Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods declared in interface com.ibm.dtfj.image.ImageProcess
getExecutable, getID, getLibraries, getPointerSize, getProperties, getRuntimes, getSignalName, getSignalNumber, getThreads
-
-
-
-
Constructor Detail
-
J9DDRImageProcess
public J9DDRImageProcess(IProcess thisProcess)
-
-
Method Detail
-
getIProcess
public IProcess getIProcess()
-
getCommandLine
public String getCommandLine() throws DataUnavailable, CorruptDataException
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
public ImageThread getCurrentThread() throws CorruptDataException
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:
ImageThread
-
getEnvironment
public Properties getEnvironment() throws DataUnavailable, CorruptDataException
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
-
getThread
public J9DDRBaseImageThread getThread(long id)
-
getVersion
public String 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.
-
-