Skip to content

Commit 41fb4a7

Browse files
committed
add missing uninterruptible annotation
1 parent 98bf662 commit 41fb4a7

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

substratevm/src/com.oracle.svm.core.genscavenge/src/com/oracle/svm/core/genscavenge/RuntimeCodeCacheWalker.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,12 @@ public <T extends CodeInfo> boolean visitCode(T codeInfo) {
113113
return true;
114114
}
115115

116+
@Uninterruptible(reason = "Called from uninterruptible code.")
116117
private static boolean isReachable(Object possiblyForwardedObject) {
117118
return RuntimeCodeCacheReachabilityAnalyzer.isReachable(Word.objectToUntrackedPointer(possiblyForwardedObject));
118119
}
119120

121+
@Uninterruptible(reason = "Called from uninterruptible code.")
120122
private boolean hasWeakReferenceToUnreachableObject(CodeInfo codeInfo) {
121123
checkForUnreachableObjectsVisitor.initialize();
122124
RuntimeCodeInfoAccess.walkWeakReferences(codeInfo, checkForUnreachableObjectsVisitor);

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/code/CodeInfoTable.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ private static void invalidateCodeAtSafepoint(CodeInfo info) {
226226
}
227227

228228
@RestrictHeapAccess(access = Access.NO_ALLOCATION, reason = "Called by the GC")
229+
@Uninterruptible(reason = "Called from uninterruptible code.")
229230
public static void invalidateNonStackCodeAtSafepoint(CodeInfo info) {
230231
VMOperation.guaranteeGCInProgress("Must only be called during a GC.");
231232
RuntimeCodeCache codeCache = getRuntimeCodeCache();

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/code/RuntimeCodeInfoAccess.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,15 @@ public static Object[] prepareHeapObjectData(CodeInfoTether tether, String name,
146146
return objectFields;
147147
}
148148

149+
@Uninterruptible(reason = "Called from uninterruptible code.")
149150
public static boolean areAllObjectsOnImageHeap(CodeInfo info) {
150151
return cast(info).getAllObjectsAreInImageHeap();
151152
}
152153

153154
/**
154155
* Walks all strong references in a {@link CodeInfo} object.
155156
*/
157+
@Uninterruptible(reason = "Called from uninterruptible code.")
156158
public static boolean walkStrongReferences(CodeInfo info, ObjectReferenceVisitor visitor) {
157159
return NonmovableArrays.walkUnmanagedObjectArray(cast(info).getObjectFields(), visitor, CodeInfoImpl.FIRST_STRONGLY_REFERENCED_OBJFIELD, CodeInfoImpl.STRONGLY_REFERENCED_OBJFIELD_COUNT);
158160
}
@@ -161,6 +163,7 @@ public static boolean walkStrongReferences(CodeInfo info, ObjectReferenceVisitor
161163
* Walks all weak references in a {@link CodeInfo} object.
162164
*/
163165
@DuplicatedInNativeCode
166+
@Uninterruptible(reason = "Called from uninterruptible code.")
164167
public static boolean walkWeakReferences(CodeInfo info, ObjectReferenceVisitor visitor) {
165168
CodeInfoImpl impl = cast(info);
166169
boolean continueVisiting = true;
@@ -181,6 +184,7 @@ public static boolean walkWeakReferences(CodeInfo info, ObjectReferenceVisitor v
181184
* This method only visits a very specific subset of all the references, so you typically want
182185
* to use {@link #walkStrongReferences} and/or {@link #walkWeakReferences} instead.
183186
*/
187+
@Uninterruptible(reason = "Called from uninterruptible code.")
184188
public static boolean walkObjectFields(CodeInfo info, ObjectReferenceVisitor visitor) {
185189
return NonmovableArrays.walkUnmanagedObjectArray(cast(info).getObjectFields(), visitor);
186190
}

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/heap/RuntimeCodeCacheCleaner.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ public <T extends CodeInfo> boolean visitCode(T codeInfo) {
8181
return true;
8282
}
8383

84+
@Uninterruptible(reason = "Called from uninterruptible code.")
8485
private static void freeMemory(CodeInfo codeInfo) {
8586
boolean removed = RuntimeCodeInfoMemory.singleton().removeDuringGC(codeInfo);
8687
assert removed : "must have been present";

0 commit comments

Comments
 (0)