diff --git a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/image/NativeImage.java b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/image/NativeImage.java index be811082665a..bec483a76df8 100644 --- a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/image/NativeImage.java +++ b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/image/NativeImage.java @@ -99,6 +99,7 @@ import com.oracle.svm.core.option.SubstrateOptionsParser; import com.oracle.svm.core.util.UserError; import com.oracle.svm.core.util.VMError; +import com.oracle.svm.hosted.DeadlockWatchdog; import com.oracle.svm.hosted.FeatureImpl; import com.oracle.svm.hosted.NativeImageOptions; import com.oracle.svm.hosted.c.CGlobalDataFeature; @@ -921,6 +922,7 @@ private static void printSize(ImageHeapPartition partition) { } public abstract static class NativeTextSectionImpl extends BasicProgbitsSectionImpl { + DeadlockWatchdog watchdog = DeadlockWatchdog.singleton(); public static NativeTextSectionImpl factory(RelocatableBuffer relocatableBuffer, ObjectFile objectFile, NativeImageCodeCache codeCache) { return codeCache.getTextSectionImpl(relocatableBuffer, objectFile, codeCache); @@ -993,6 +995,7 @@ protected void writeTextSection(DebugContext debug, final Section textSection, f final String symName = localSymbolNameForMethod(current); final String signatureString = current.getUniqueShortName(); defineMethodSymbol(textSection, current, methodsBySignature, signatureString, symName, ImageLayerBuildingSupport.buildingSharedLayer(), pair.getRight()); + watchdog.recordActivity(); } // 2. fq without return type -- only for entry points! for (Map.Entry ent : methodsBySignature.entrySet()) { @@ -1016,6 +1019,7 @@ protected void writeTextSection(DebugContext debug, final Section textSection, f defineMethodSymbol(cEntryData.getSymbolName(), true, textSection, method, codeCache.compilationResultFor(method)); } } + watchdog.recordActivity(); } // Write the text contents.