public interface ReachabilityAnalysis
| Modifier and Type | Method and Description |
|---|---|
AnalysisType |
addRootClass(AnalysisType type,
boolean addFields,
boolean addArrayClass) |
AnalysisType |
addRootClass(Class<?> clazz,
boolean addFields,
boolean addArrayClass)
Marks given class and all its superclasses as reachable.
|
AnalysisType |
addRootField(Class<?> clazz,
String fieldName)
Marks given field as accessed.
|
AnalysisMethod |
addRootMethod(AnalysisMethod aMethod,
boolean invokeSpecial,
Object reason,
com.oracle.svm.common.meta.MultiMethod.MultiMethodKey... otherRoots)
Registers the method as root.
|
AnalysisMethod |
addRootMethod(Executable method,
boolean invokeSpecial,
Object reason,
com.oracle.svm.common.meta.MultiMethod.MultiMethodKey... otherRoots) |
AnalysisPolicy |
analysisPolicy() |
void |
cleanupAfterAnalysis()
Clears all intermediary data to reduce the footprint.
|
boolean |
finish()
Waits until the analysis is done.
|
void |
forceUnsafeUpdate(AnalysisField field)
Force update of the unsafe loads and unsafe store type flows when a field is registered as
unsafe accessed 'on the fly', i.e., during the analysis.
|
Iterable<AnalysisType> |
getAllInstantiatedTypes() |
Iterable<AnalysisType> |
getAllSynchronizedTypes() |
AnalysisMetaAccess |
getMetaAccess() |
AnalysisUniverse |
getUniverse() |
default void |
markFieldAccessed(AnalysisField field,
Object reason) |
default void |
markFieldRead(AnalysisField field,
Object reason) |
default void |
markFieldWritten(AnalysisField field,
Object reason) |
default void |
registerAsFrozenUnsafeAccessed(AnalysisField field) |
void |
registerAsJNIAccessed(AnalysisField field,
boolean writable)
Performs any necessary additional steps required by the analysis to handle JNI accessed
fields.
|
default boolean |
registerAsUnsafeAccessed(AnalysisField field,
com.oracle.svm.util.UnsafePartitionKind partitionKind,
Object reason) |
default boolean |
registerTypeAsAllocated(AnalysisType type,
Object reason) |
default boolean |
registerTypeAsInHeap(AnalysisType type,
Object reason) |
default boolean |
registerTypeAsReachable(AnalysisType type,
Object reason) |
AnalysisType addRootClass(Class<?> clazz, boolean addFields, boolean addArrayClass)
clazz - class to be markedaddFields - if true, all instance fiels are marked as accessedaddArrayClass - if true, the array class is registered as wellAnalysisType addRootClass(AnalysisType type, boolean addFields, boolean addArrayClass)
AnalysisType addRootField(Class<?> clazz, String fieldName)
AnalysisMethod addRootMethod(AnalysisMethod aMethod, boolean invokeSpecial, Object reason, com.oracle.svm.common.meta.MultiMethod.MultiMethodKey... otherRoots)
MultiMethod.ORIGINAL_METHOD.
Static methods are immediately analyzed and marked as implementation-invoked which will also
trigger their compilation.
Special and virtual invoked methods are conditionally linked. Only when the receiver type (or
one of its subtypes) is marked as instantiated the resolved concrete method is analyzed and
marked as implementation-invoked and later compiled. This also means that abstract methods
can be marked as virtual invoked roots; only the implementation methods whose declaring class
is instantiated will actually be linked. Trying to register an abstract method as a special
invoked root will result in an error.
If otherRoots are specified, these versions of the method will also be registered as
root methods.aMethod - the method to register as rootinvokeSpecial - if true only the target method is analyzed, even if it has overrides, or
it is itself an override. If the method is static this flag is ignored.otherRoots - other versions of this method to also register as roots.AnalysisMethod addRootMethod(Executable method, boolean invokeSpecial, Object reason, com.oracle.svm.common.meta.MultiMethod.MultiMethodKey... otherRoots)
default void registerAsFrozenUnsafeAccessed(AnalysisField field)
default boolean registerAsUnsafeAccessed(AnalysisField field, com.oracle.svm.util.UnsafePartitionKind partitionKind, Object reason)
default boolean registerTypeAsReachable(AnalysisType type, Object reason)
default boolean registerTypeAsAllocated(AnalysisType type, Object reason)
default boolean registerTypeAsInHeap(AnalysisType type, Object reason)
default void markFieldAccessed(AnalysisField field, Object reason)
default void markFieldRead(AnalysisField field, Object reason)
default void markFieldWritten(AnalysisField field, Object reason)
boolean finish()
throws InterruptedException
InterruptedExceptionvoid cleanupAfterAnalysis()
void forceUnsafeUpdate(AnalysisField field)
field - the newly unsafe registered field. We use its declaring type to filter the
unsafe access flows that need to be updated.void registerAsJNIAccessed(AnalysisField field, boolean writable)
Iterable<AnalysisType> getAllSynchronizedTypes()
Iterable<AnalysisType> getAllInstantiatedTypes()
AnalysisMetaAccess getMetaAccess()
AnalysisUniverse getUniverse()
AnalysisPolicy analysisPolicy()