java.lang.Object
com.ibm.jvm.format.TraceRecord
- All Implemented Interfaces:
Comparable
- Direct Known Subclasses:
TraceRecordExternal,TraceRecordInternal
The Trace Record corresponds to a runtime Trace Buffer, it is responsible for formatting
individual trace entries.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final byteprotected static final byteprotected static final StringBufferprotected byte[]protected intprotected static final String[]protected byte[]protected intprotected intprotected BigIntegerprotected intprotected static final byteprotected static final byteprotected static final byteprotected static final byteprotected static final byteprotected static final byteprotected static final byteprotected static final byteprotected static final byteprotected intprotected static Hashtableprotected static longprotected Stackprotected static final byteprotected static final byteprotected byte[]protected longprotected booleanprotected intprotected static final byteprotected static final byteprotected booleanprotected longprotected static final Stringprotected longprotected Stringprotected longprotected longprotected BigIntegerprotected static final intprotected TraceFileprotected static final intprotected TraceThreadprotected static final String[]protected BigIntegerprotected BigIntegerprotected Stackprotected BigIntegerprotected BigInteger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal intcompares this TraceRecord to another based on the time stamp.protected final Stringreturn: the formatted trace entry.protected final BigIntegerreturns the latest time stamp read so farprotected static final StringBuffersets the indent associated with a given thread idprotected intprotected final TraceRecordreturns the latest time stamp read so farprotected static final voidInitializes static variables.protected voidprime()protected final intprocessNextEntryHeader(byte[] entry, int start) sets up current* fields for later formattingprotected final voidrelease()release the record data for this TraceRecord so GC can do it's stuffprotected static final voidsetIndent(String threadID, StringBuffer buffer) sets the indent associated with a given thread id
-
Field Details
-
indentLevels
-
lastThread
protected static long lastThread -
EVENT_TYPE
protected static final byte EVENT_TYPE- See Also:
-
EXCEPTION_TYPE
protected static final byte EXCEPTION_TYPE- See Also:
-
ENTRY_TYPE
protected static final byte ENTRY_TYPE- See Also:
-
ENTRY_EXCPT_TYPE
protected static final byte ENTRY_EXCPT_TYPE- See Also:
-
EXIT_TYPE
protected static final byte EXIT_TYPE- See Also:
-
EXIT_EXCPT_TYPE
protected static final byte EXIT_EXCPT_TYPE- See Also:
-
MEM_TYPE
protected static final byte MEM_TYPE- See Also:
-
MEM_EXCPT_TYPE
protected static final byte MEM_EXCPT_TYPE- See Also:
-
DEBUG_TYPE
protected static final byte DEBUG_TYPE- See Also:
-
DEBUG_EXCPT_TYPE
protected static final byte DEBUG_EXCPT_TYPE- See Also:
-
PERF_TYPE
protected static final byte PERF_TYPE- See Also:
-
PERF_EXCPT_TYPE
protected static final byte PERF_EXCPT_TYPE- See Also:
-
ASSERT_TYPE
protected static final byte ASSERT_TYPE- See Also:
-
APP_TYPE
protected static final byte APP_TYPE- See Also:
-
ERROR_TYPE
protected static final byte ERROR_TYPE- See Also:
-
Chars
-
types
-
BASE_INDENT
-
TAB
- See Also:
-
TRACEID_OFFSET
protected static final int TRACEID_OFFSET- See Also:
-
TIMESTAMP_OFFSET
protected static final int TIMESTAMP_OFFSET- See Also:
-
buffer
protected byte[] buffer -
nextEight
protected byte[] nextEight -
timeStamp
-
wrapTime
-
writePlatform
-
writeSystem
-
threadID
protected long threadID -
threadSyn1
protected long threadSyn1 -
threadSyn2
protected long threadSyn2 -
threadName
-
nextEntry
protected long nextEntry -
recordFinished
protected boolean recordFinished -
traceThread
-
traceFile
-
bufferSize
protected int bufferSize -
start
protected long start -
offset
protected int offset -
currentBuffer
protected byte[] currentBuffer -
currentOffset
protected int currentOffset -
currentTraceID
protected int currentTraceID -
currentLength
protected int currentLength -
currentTimeStamp
-
upperWord
-
wrapTimes
-
longEntryTraceIDs
-
notFormatted
protected boolean notFormatted -
headerSize
protected int headerSize
-
-
Constructor Details
-
TraceRecord
- Throws:
IOException
-
-
Method Details
-
initStatics
protected static final void initStatics()Initializes static variables.This is called each time the TraceFormatter is started, from the initStatics() method in TraceFormat.java
-
getCurrentTimeStamp
returns the latest time stamp read so far- Parameters:
info-- Returns:
- a biginteger that is that timestamp
-
getNextRecord
returns the latest time stamp read so far- Parameters:
info-- Returns:
- a biginteger that is that timestamp
-
processNextEntryHeader
sets up current* fields for later formatting- Throws:
IOException
-
formatCurrentEntry
return: the formatted trace entry.- Throws:
IOException
-
release
protected final void release()release the record data for this TraceRecord so GC can do it's stuff -
compareTo
compares this TraceRecord to another based on the time stamp.- Specified by:
compareToin interfaceComparable- Parameters:
other- the object to be compared.- Returns:
- an int which is negative if this entry is older than other, 0, if they are the same age, and positive if this is newer
-
getIndent
sets the indent associated with a given thread id- Parameters:
threadid- a string that is the id of the thread which is to be indented- Returns:
- a stringbuffer of spaces that is the amount to indent the entry associates with the specified thread id
-
setIndent
sets the indent associated with a given thread id- Parameters:
buffer- a stringbuffer of spaces that is the amount to indent the entries associates with the specified thread idthreadid- a string that is the id of the thread which is to have its indent level set
-
prime
- Throws:
IOException
-
getNextEntry
- Throws:
IOException
-