From 4b9c63db650ebf48a49ea1e9e4128b90f84ef52d Mon Sep 17 00:00:00 2001 From: Christian Haeubl Date: Thu, 10 Jun 2021 13:49:08 +0200 Subject: [PATCH] Provide more CodeInfo offsets. --- .../src/com/oracle/svm/core/code/CodeInfoOffsets.java | 4 ++++ .../src/com/oracle/svm/core/code/RuntimeCodeInfoMemory.java | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/code/CodeInfoOffsets.java b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/code/CodeInfoOffsets.java index e15e95d256ec..2f68861169b7 100644 --- a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/code/CodeInfoOffsets.java +++ b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/code/CodeInfoOffsets.java @@ -82,4 +82,8 @@ public static long codeConstantsReferenceMapEncoding() { public static long codeConstantsReferenceMapIndex() { return OffsetOf.get(CodeInfoImpl.class, "CodeConstantsReferenceMapIndex"); } + + public static long areAllObjectsInImageHeap() { + return OffsetOf.get(CodeInfoImpl.class, "AllObjectsAreInImageHeap"); + } } diff --git a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/code/RuntimeCodeInfoMemory.java b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/code/RuntimeCodeInfoMemory.java index 0b9ba05e8ad6..071aec06be27 100644 --- a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/code/RuntimeCodeInfoMemory.java +++ b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/code/RuntimeCodeInfoMemory.java @@ -206,7 +206,8 @@ public boolean walkRuntimeMethodsDuringGC(CodeInfoVisitor visitor) { } // If the visitor removed the current entry from the table, then it is necessary to - // visit the now updated entry one more time. + // visit the now updated entry one more time. However, this could have the effect + // that some entries are visited more than once. if (info == NonmovableArrays.getWord(table, i)) { i++; }