Module openj9.dtfj

Class J9DDRImageProcess

  • All Implemented Interfaces:
    ImageProcess

    public class J9DDRImageProcess
    extends Object
    implements ImageProcess
    Adapter for DDR IProcesses to make them implement the ImageProcess API
    • 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 interface ImageProcess
        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 interface ImageProcess
        Returns:
        ImageThread
        Throws:
        CorruptDataException
        See Also:
        ImageThread
      • 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.