Skip to content

Commit b188cdd

Browse files
committed
[GR-64735] Record watchdog activity in NativeTextSectionImpl.
PullRequest: graal/20723
2 parents d946a7c + fc38d71 commit b188cdd

File tree

1 file changed

+4
-0
lines changed
  • substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/image

1 file changed

+4
-0
lines changed

substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/image/NativeImage.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
import com.oracle.svm.core.option.SubstrateOptionsParser;
100100
import com.oracle.svm.core.util.UserError;
101101
import com.oracle.svm.core.util.VMError;
102+
import com.oracle.svm.hosted.DeadlockWatchdog;
102103
import com.oracle.svm.hosted.FeatureImpl;
103104
import com.oracle.svm.hosted.NativeImageOptions;
104105
import com.oracle.svm.hosted.c.CGlobalDataFeature;
@@ -921,6 +922,7 @@ private static void printSize(ImageHeapPartition partition) {
921922
}
922923

923924
public abstract static class NativeTextSectionImpl extends BasicProgbitsSectionImpl {
925+
DeadlockWatchdog watchdog = DeadlockWatchdog.singleton();
924926

925927
public static NativeTextSectionImpl factory(RelocatableBuffer relocatableBuffer, ObjectFile objectFile, NativeImageCodeCache codeCache) {
926928
return codeCache.getTextSectionImpl(relocatableBuffer, objectFile, codeCache);
@@ -993,6 +995,7 @@ protected void writeTextSection(DebugContext debug, final Section textSection, f
993995
final String symName = localSymbolNameForMethod(current);
994996
final String signatureString = current.getUniqueShortName();
995997
defineMethodSymbol(textSection, current, methodsBySignature, signatureString, symName, ImageLayerBuildingSupport.buildingSharedLayer(), pair.getRight());
998+
watchdog.recordActivity();
996999
}
9971000
// 2. fq without return type -- only for entry points!
9981001
for (Map.Entry<String, HostedMethod> ent : methodsBySignature.entrySet()) {
@@ -1016,6 +1019,7 @@ protected void writeTextSection(DebugContext debug, final Section textSection, f
10161019
defineMethodSymbol(cEntryData.getSymbolName(), true, textSection, method, codeCache.compilationResultFor(method));
10171020
}
10181021
}
1022+
watchdog.recordActivity();
10191023
}
10201024

10211025
// Write the text contents.

0 commit comments

Comments
 (0)