public class RuntimeCodeCache extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
RuntimeCodeCache.CodeInfoVisitor
This is the interface that clients have to implement.
|
static class |
RuntimeCodeCache.Options |
Constructor and Description |
---|
RuntimeCodeCache() |
Modifier and Type | Method and Description |
---|---|
void |
addMethod(CodeInfo info) |
protected void |
invalidateMethod(CodeInfo info) |
protected void |
invalidateNonStackMethod(CodeInfo info) |
void |
logRecentOperations(Log log) |
void |
logTable() |
void |
logTable(Log log) |
protected UntetheredCodeInfo |
lookupCodeInfo(org.graalvm.nativeimage.c.function.CodePointer ip)
Looking up a method is lock-free: it is called frequently during stack walking, so locking or
even a
VMOperation would be too slow. |
void |
tearDown()
Tear down the heap, return all allocated virtual memory chunks to VirtualMemoryProvider.
|
boolean |
walkRuntimeMethods(MemoryWalker.Visitor visitor) |
public final void tearDown()
protected UntetheredCodeInfo lookupCodeInfo(org.graalvm.nativeimage.c.function.CodePointer ip)
VMOperation
would be too slow. The lookup must access the RuntimeCodeCache.codeInfos
array, which is modified non-atomically when adding or removing methods. All modifications
are done from within a VMOperation
. Making this method Uninterruptible
ensures that we see one consistent snapshot of the array, without the possibility for a
concurrent modification.public void addMethod(CodeInfo info)
protected void invalidateMethod(CodeInfo info)
protected void invalidateNonStackMethod(CodeInfo info)
public void logTable()
public void logRecentOperations(Log log)
public void logTable(Log log)
public boolean walkRuntimeMethods(MemoryWalker.Visitor visitor)