99
99
import com .oracle .svm .core .option .SubstrateOptionsParser ;
100
100
import com .oracle .svm .core .util .UserError ;
101
101
import com .oracle .svm .core .util .VMError ;
102
+ import com .oracle .svm .hosted .DeadlockWatchdog ;
102
103
import com .oracle .svm .hosted .FeatureImpl ;
103
104
import com .oracle .svm .hosted .NativeImageOptions ;
104
105
import com .oracle .svm .hosted .c .CGlobalDataFeature ;
@@ -921,6 +922,7 @@ private static void printSize(ImageHeapPartition partition) {
921
922
}
922
923
923
924
public abstract static class NativeTextSectionImpl extends BasicProgbitsSectionImpl {
925
+ DeadlockWatchdog watchdog = DeadlockWatchdog .singleton ();
924
926
925
927
public static NativeTextSectionImpl factory (RelocatableBuffer relocatableBuffer , ObjectFile objectFile , NativeImageCodeCache codeCache ) {
926
928
return codeCache .getTextSectionImpl (relocatableBuffer , objectFile , codeCache );
@@ -993,6 +995,7 @@ protected void writeTextSection(DebugContext debug, final Section textSection, f
993
995
final String symName = localSymbolNameForMethod (current );
994
996
final String signatureString = current .getUniqueShortName ();
995
997
defineMethodSymbol (textSection , current , methodsBySignature , signatureString , symName , ImageLayerBuildingSupport .buildingSharedLayer (), pair .getRight ());
998
+ watchdog .recordActivity ();
996
999
}
997
1000
// 2. fq without return type -- only for entry points!
998
1001
for (Map .Entry <String , HostedMethod > ent : methodsBySignature .entrySet ()) {
@@ -1016,6 +1019,7 @@ protected void writeTextSection(DebugContext debug, final Section textSection, f
1016
1019
defineMethodSymbol (cEntryData .getSymbolName (), true , textSection , method , codeCache .compilationResultFor (method ));
1017
1020
}
1018
1021
}
1022
+ watchdog .recordActivity ();
1019
1023
}
1020
1024
1021
1025
// Write the text contents.
0 commit comments