Package org.openjdk.jmc.flightrecorder
Class RecordingPrinter
- java.lang.Object
-
- org.openjdk.jmc.flightrecorder.RecordingPrinter
-
public final class RecordingPrinter extends java.lang.Object
Prints a flight recording to aPrintWriter
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RecordingPrinter.Verbosity
Verbosity level to use when printing events.
-
Field Summary
Fields Modifier and Type Field Description private boolean
formatValues
private java.io.PrintWriter
out
private IOnLoadFilter
recordingFilter
private RecordingPrinter.Verbosity
verbosity
-
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 RecordingPrinter
buildFromOptions(java.io.PrintWriter output, java.lang.String[] args)
private static java.lang.String
formatPackage(IMCPackage mcPackage)
static void
main(java.lang.String[] args)
Main method that will print a recording Usage:void
print(IItemCollection events)
void
printEvent(IItem e)
private static void
printFrame(java.lang.String indent, IMCFrame frame, java.io.PrintWriter out)
private static void
printHelp()
private void
printTrace(IMCStackTrace trace)
private void
printValue(IAccessorKey<?> attribute, IDescribable desc, java.lang.Object value)
private void
printValues(IItem event)
private java.lang.String
stringify(java.lang.String indent, java.lang.Object value)
private static java.lang.String
stringifyMethod(IMCMethod method)
private static java.lang.String
stringifyType(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, CouldNotLoadRecordingException
Main 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.IOException
java.lang.InterruptedException
CouldNotLoadRecordingException
-
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)
-
-