Module openj9.dtfj

Class TraceFileHeaderWriter


  • public class TraceFileHeaderWriter
    extends Object
    • Constructor Detail

      • TraceFileHeaderWriter

        public TraceFileHeaderWriter​(String snapTraceFileName,
                                     boolean bigEndian,
                                     int cpuCount,
                                     int wordSize,
                                     int bufferSize,
                                     String arch,
                                     String processorSubType,
                                     String serviceLevel,
                                     String startupOptions,
                                     String traceConfig,
                                     long startPlatform,
                                     long startSystem,
                                     int type,
                                     int generations)
                              throws IOException
        This class generates a trace file header. It is intended to be used when a core dump has been taken before the JVM has written out any trace, the trace header is not initialized until that happens. There are a lot of arguments to pass but this data can be obtained from the dump and prevents this code needing to exist in 23, 24 and 26 flavours.
        Parameters:
        snapTraceFileName - the filename to write the trace header to
        bigEndian - true if the dump came from a big endian system.
        cpuCount - the number of cpu's on the system the dump came from
        wordSize - the wordsize of the system the dump came from
        bufferSize - the size of the trace buffers in the dump
        arch - a string denoting the architecture of the system the dump came from
        processorSubType - a string denoting the cpu subtype of the system the dump came from
        serviceLevel - the service level of the jvm the dump came from
        startupOptions - a string containing the jvm startup options
        generations -
        type -
        Throws:
        IOException
    • Method Detail

      • createAndWriteTraceFileHeader

        public byte[] createAndWriteTraceFileHeader()
                                             throws IOException
        Reassembles the trace file header from scratch (because there wasn't one in the core dump we could reuse). Based on initTraceHeader in ut_trace.c
        Throws:
        IOException