Skip to content

Commit 74f6303

Browse files
committed
report watchdog activity in RestrictHeapAccessCalleesImpl.aggregateMethods
1 parent 2c57cba commit 74f6303

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/code/RestrictHeapAccessCalleesImpl.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import java.util.Map;
3232
import java.util.Set;
3333

34+
import com.oracle.svm.hosted.DeadlockWatchdog;
3435
import org.graalvm.collections.EconomicSet;
3536
import org.graalvm.collections.UnmodifiableEconomicSet;
3637
import org.graalvm.nativeimage.ImageSingletons;
@@ -107,14 +108,17 @@ public Map<AnalysisMethod, RestrictionInfo> getCallerMap() {
107108
public void aggregateMethods(Collection<AnalysisMethod> methods) {
108109
assert !initialized : "RestrictHeapAccessCallees.aggregateMethods: Should only initialize once.";
109110
Map<AnalysisMethod, RestrictionInfo> aggregation = new HashMap<>();
111+
DeadlockWatchdog watchdog = DeadlockWatchdog.singleton();
110112
for (AnalysisMethod method : methods) {
113+
watchdog.recordActivity();
111114
if (method.isAnnotationPresent(RestrictHeapAccess.class)) {
112115
setMethodRestrictionInfo(method, aggregation);
113116
}
114117
}
115118
MethodAggregator visitor = new MethodAggregator(aggregation, assertionErrorConstructorList);
116119
AnalysisMethodCalleeWalker walker = new AnalysisMethodCalleeWalker();
117120
for (AnalysisMethod method : aggregation.keySet().toArray(AnalysisMethod.EMPTY_ARRAY)) {
121+
watchdog.recordActivity();
118122
walker.walkMethod(method, visitor);
119123
}
120124
calleeToCallerMap = Collections.unmodifiableMap(aggregation);

0 commit comments

Comments
 (0)