Package org.openjdk.jmc.flightrecorder
Class RecordingPrinter
- java.lang.Object
-
- org.openjdk.jmc.flightrecorder.RecordingPrinter
-
public final class RecordingPrinter extends java.lang.ObjectPrints a flight recording to aPrintWriter.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRecordingPrinter.VerbosityVerbosity level to use when printing events.
-
Field Summary
Fields Modifier and Type Field Description private booleanformatValuesprivate java.io.PrintWriteroutprivate IOnLoadFilterrecordingFilterprivate RecordingPrinter.Verbosityverbosity
-
Constructor Summary
Constructors Constructor Description RecordingPrinter(java.io.PrintWriter output, RecordingPrinter.Verbosity verbosity, boolean formatValues)RecordingPrinter(java.io.PrintWriter output, RecordingPrinter.Verbosity verbosity, boolean formatValues, IOnLoadFilter recordingFilter)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static RecordingPrinterbuildFromOptions(java.io.PrintWriter output, java.lang.String[] args)private static java.lang.StringformatPackage(IMCPackage mcPackage)static voidmain(java.lang.String[] args)Main method that will print a recording Usage:voidprint(IItemCollection events)voidprintEvent(IItem e)private static voidprintFrame(java.lang.String indent, IMCFrame frame, java.io.PrintWriter out)private static voidprintHelp()private voidprintTrace(IMCStackTrace trace)private voidprintValue(IAccessorKey<?> attribute, IDescribable desc, java.lang.Object value)private voidprintValues(IItem event)private java.lang.Stringstringify(java.lang.String indent, java.lang.Object value)private static java.lang.StringstringifyMethod(IMCMethod method)private static java.lang.StringstringifyType(IMCType type)
-
-
-
Field Detail
-
verbosity
private final RecordingPrinter.Verbosity verbosity
-
formatValues
private final boolean formatValues
-
recordingFilter
private final IOnLoadFilter recordingFilter
-
out
private final java.io.PrintWriter out
-
-
Constructor Detail
-
RecordingPrinter
public RecordingPrinter(java.io.PrintWriter output, RecordingPrinter.Verbosity verbosity, boolean formatValues, IOnLoadFilter recordingFilter)
-
RecordingPrinter
public RecordingPrinter(java.io.PrintWriter output, RecordingPrinter.Verbosity verbosity, boolean formatValues)
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.io.IOException, java.lang.InterruptedException, CouldNotLoadRecordingExceptionMain method that will print a recording Usage:java org.openjdk.jmc.flightrecorder [-formatValues] [-brief] fileName - formatValues will format values in a suitable unit (may loose precision) - brief will print only parts of all event values.
- Throws:
java.io.IOExceptionjava.lang.InterruptedExceptionCouldNotLoadRecordingException
-
print
public void print(IItemCollection events)
-
buildFromOptions
private static RecordingPrinter buildFromOptions(java.io.PrintWriter output, java.lang.String[] args) throws java.text.ParseException
- Throws:
java.text.ParseException
-
printHelp
private static void printHelp()
-
printEvent
public void printEvent(IItem e)
-
printValues
private void printValues(IItem event)
-
printValue
private void printValue(IAccessorKey<?> attribute, IDescribable desc, java.lang.Object value)
-
stringify
private java.lang.String stringify(java.lang.String indent, java.lang.Object value)
-
printTrace
private void printTrace(IMCStackTrace trace)
-
printFrame
private static void printFrame(java.lang.String indent, IMCFrame frame, java.io.PrintWriter out)
-
stringifyType
private static java.lang.String stringifyType(IMCType type)
-
stringifyMethod
private static java.lang.String stringifyMethod(IMCMethod method)
-
formatPackage
private static java.lang.String formatPackage(IMCPackage mcPackage)
-
-