changeset 22823:ea1f44a4c0c9

Allow subclasses to intercept Truffle shutdown hooks
author Christian Wimmer <christian.wimmer@oracle.com>
date Wed, 14 Oct 2015 14:25:43 -0700
parents 209d958f3b9d
children 7efb735091c5
files graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/GraalTruffleRuntime.java
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/GraalTruffleRuntime.java	Wed Oct 14 13:53:46 2015 -0700
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/GraalTruffleRuntime.java	Wed Oct 14 14:25:43 2015 -0700
@@ -115,8 +115,12 @@
         TraceSplittingListener.install(this);
         PrintCallTargetProfiling.install(this);
         CompilationStatisticsListener.install(this);
+        installShutdownHooks();
+        compilationNotify.notifyStartup(this);
+    }
+
+    protected void installShutdownHooks() {
         Runtime.getRuntime().addShutdownHook(new Thread(this::shutdown));
-        compilationNotify.notifyStartup(this);
     }
 
     protected void lookupCallMethods(MetaAccessProvider metaAccess) {