diff --git a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/SubstrateExitHandlerFeature.java b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/SubstrateExitHandlerFeature.java index d1ff3cac988..173c7e5436f 100644 --- a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/SubstrateExitHandlerFeature.java +++ b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/SubstrateExitHandlerFeature.java @@ -34,7 +34,7 @@ public class SubstrateExitHandlerFeature implements InternalFeature { @Override public void beforeAnalysis(BeforeAnalysisAccess access) { - if (SubstrateOptions.InstallExitHandlers.getValue()) { + if (SubstrateOptions.InstallExitHandlers.getValue() || VMInspectionOptions.hasJfrSupport()) { RuntimeSupport.getRuntimeSupport().addStartupHook(new SubstrateExitHandlerStartupHook()); } }