Package org.openjdk.jmh.runner
Class ForkedMain
java.lang.Object
org.openjdk.jmh.runner.ForkedMain
Main program entry point for forked JVM instance
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
Hangup thread will detach us from the host VM properly, in three cases: - normal shutdown - shutdown with benchmark exception - any System.exit call The need to intercept System.exit calls is the reason to register ourselves as the shutdown hook.private static class
Shutdown timeout thread will forcefully exit the VM in two cases: - stray non-daemon thread prevents the VM from exiting - all user threads have finished, but we are stuck in some shutdown hook or finalizer In all other "normal" cases, VM will exit before the timeout expires. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static Throwable
private static boolean
private static final AtomicBoolean
private static final AtomicReference
<BinaryLinkClient> private static PrintStream
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
hangupFuse
-
linkRef
-
gracefullyFinished
private static volatile boolean gracefullyFinished -
exception
-
nakedErr
-
-
Constructor Details
-
ForkedMain
ForkedMain()
-
-
Method Details
-
main
Application main entry point- Parameters:
argv
- Command line arguments
-
hangup
static void hangup()Report our latest status to the host VM, and say goodbye.
-