public abstract class PointsToAnalysis extends AbstractAnalysisEngine
| Modifier and Type | Class and Description |
|---|---|
protected class |
PointsToAnalysis.AnalysisTiming |
protected static class |
PointsToAnalysis.BucketTiming |
static class |
PointsToAnalysis.ConstantObjectsProfiler |
static interface |
PointsToAnalysis.TypeFlowRunnable |
| Modifier and Type | Field and Description |
|---|---|
AtomicLong |
numParsedGraphs |
protected boolean |
reportAnalysisStatistics |
protected boolean |
trackTypeFlowInputs |
Timer |
typeFlowTimer |
analysisPolicy, analysisTimer, debug, executor, extendedAsserts, hostVM, maxConstantObjectsPerType, metaAccess, optimizeReturnedParameter, options, processFeaturesTimer, profileConstantObjects, universe, unsupportedFeatures, verifyHeapTimer| Constructor and Description |
|---|
PointsToAnalysis(org.graalvm.compiler.options.OptionValues options,
AnalysisUniverse universe,
HostVM hostVM,
AnalysisMetaAccess metaAccess,
org.graalvm.compiler.api.replacements.SnippetReflectionProvider snippetReflectionProvider,
ConstantReflectionProvider constantReflectionProvider,
org.graalvm.compiler.word.WordTypes wordTypes,
ForkJoinPool executorService,
Runnable heartbeatCallback,
UnsupportedFeatures unsupportedFeatures,
TimerCollection timerCollection,
boolean strengthenGraalGraphs) |
| 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) |
AnalysisType |
addRootStaticField(Class<?> clazz,
String fieldName) |
static PointsToAnalysisMethod |
assertPointsToAnalysisMethod(AnalysisMethod aMethod) |
void |
checkUserLimitations()
Checks if all user defined limitations such as the number of types are satisfied.
|
void |
cleanupAfterAnalysis()
Clears all intermediary data to reduce the footprint.
|
static ForkJoinPool |
createExecutor(org.graalvm.compiler.debug.DebugContext debug,
int numberOfThreads) |
MethodTypeFlowBuilder |
createMethodTypeFlowBuilder(PointsToAnalysis bb,
PointsToAnalysisMethod method,
MethodFlowsGraph flowsGraph,
MethodFlowsGraph.GraphKind graphKind) |
boolean |
doTypeflow() |
boolean |
finish()
Performs the analysis.
|
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.
|
TypeFlow<?> |
getAllInstantiatedTypeFlow() |
Iterable<AnalysisType> |
getAllInstantiatedTypes() |
TypeFlow<?> |
getAllSynchronizedTypeFlow() |
Iterable<AnalysisType> |
getAllSynchronizedTypes() |
AnalysisType |
getGraalNodeListType() |
AnalysisType |
getGraalNodeType() |
AnalysisType |
getObjectArrayType() |
AnalysisType |
getObjectType() |
protected CompletionExecutor.Timing |
getTiming() |
AnalysisType |
lookup(JavaType type) |
void |
onTypeInstantiated(AnalysisType type,
AnalysisType.UsageKind usageKind) |
void |
postFlow(TypeFlow<?> operation) |
void |
printTimerStatistics(PrintWriter out)
Prints more detailed information about all analysis timers.
|
void |
registerAsJNIAccessed(AnalysisField field,
boolean writable)
Performs any necessary additional steps required by the analysis to handle JNI accessed
fields.
|
void |
registerUnsafeLoad(OffsetLoadTypeFlow.AbstractUnsafeLoadTypeFlow unsafeLoad) |
void |
registerUnsafeStore(OffsetStoreTypeFlow.AbstractUnsafeStoreTypeFlow unsafeStore) |
boolean |
reportAnalysisStatistics() |
boolean |
strengthenGraalGraphs() |
boolean |
trackConcreteAnalysisObjects(AnalysisType type)
By default the analysis tracks all concrete objects for all types (if the analysis is context
sensitive).
|
boolean |
trackTypeFlowInputs() |
analysisPolicy, executorIsStarted, extendedAsserts, getConstantReflectionProvider, getDebug, getDebugHandlerFactories, getHeartbeatCallback, getHostVM, getMetaAccess, getOptions, getProviders, getSnippetReflectionProvider, getUniverse, getUnsupportedFeatures, getWordTypes, maxConstantObjectsPerType, optimizeReturnedParameter, postTask, postTask, profileConstantObject, runAnalysis, scanningPolicy, schedule, skippedHeapTypes, sourcePosition, syntheticSourcePositionclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitafterAnalysis, fallbackResolveConcreteMethod, getProviders, initializeMetaData, isCallAllowed, onFieldAccessed, onTypeReachablemarkFieldAccessed, markFieldRead, markFieldWritten, registerAsFrozenUnsafeAccessed, registerAsUnsafeAccessed, registerTypeAsAllocated, registerTypeAsInHeap, registerTypeAsReachableprotected final boolean trackTypeFlowInputs
protected final boolean reportAnalysisStatistics
public final AtomicLong numParsedGraphs
public final Timer typeFlowTimer
public PointsToAnalysis(org.graalvm.compiler.options.OptionValues options,
AnalysisUniverse universe,
HostVM hostVM,
AnalysisMetaAccess metaAccess,
org.graalvm.compiler.api.replacements.SnippetReflectionProvider snippetReflectionProvider,
ConstantReflectionProvider constantReflectionProvider,
org.graalvm.compiler.word.WordTypes wordTypes,
ForkJoinPool executorService,
Runnable heartbeatCallback,
UnsupportedFeatures unsupportedFeatures,
TimerCollection timerCollection,
boolean strengthenGraalGraphs)
protected CompletionExecutor.Timing getTiming()
getTiming in class AbstractAnalysisEnginepublic void printTimerStatistics(PrintWriter out)
BigBangprintTimerStatistics in interface BigBangprintTimerStatistics in class AbstractAnalysisEnginepublic boolean strengthenGraalGraphs()
public boolean trackTypeFlowInputs()
public boolean reportAnalysisStatistics()
public MethodTypeFlowBuilder createMethodTypeFlowBuilder(PointsToAnalysis bb, PointsToAnalysisMethod method, MethodFlowsGraph flowsGraph, MethodFlowsGraph.GraphKind graphKind)
public void registerUnsafeLoad(OffsetLoadTypeFlow.AbstractUnsafeLoadTypeFlow unsafeLoad)
public void registerUnsafeStore(OffsetStoreTypeFlow.AbstractUnsafeStoreTypeFlow unsafeStore)
public void forceUnsafeUpdate(AnalysisField field)
ReachabilityAnalysisfield - the newly unsafe registered field. We use its declaring type to filter the
unsafe access flows that need to be updated.public void registerAsJNIAccessed(AnalysisField field, boolean writable)
ReachabilityAnalysispublic boolean trackConcreteAnalysisObjects(AnalysisType type)
public void cleanupAfterAnalysis()
ReachabilityAnalysiscleanupAfterAnalysis in interface ReachabilityAnalysiscleanupAfterAnalysis in class AbstractAnalysisEnginepublic AnalysisType lookup(JavaType type)
public AnalysisType getObjectType()
public AnalysisType getObjectArrayType()
public AnalysisType getGraalNodeType()
public AnalysisType getGraalNodeListType()
public TypeFlow<?> getAllInstantiatedTypeFlow()
public Iterable<AnalysisType> getAllInstantiatedTypes()
public TypeFlow<?> getAllSynchronizedTypeFlow()
public Iterable<AnalysisType> getAllSynchronizedTypes()
public AnalysisMethod addRootMethod(Executable method, boolean invokeSpecial, Object reason, com.oracle.svm.common.meta.MultiMethod.MultiMethodKey... otherRoots)
public AnalysisMethod addRootMethod(AnalysisMethod aMethod, boolean invokeSpecial, Object reason, com.oracle.svm.common.meta.MultiMethod.MultiMethodKey... otherRoots)
ReachabilityAnalysisMultiMethod.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.public static PointsToAnalysisMethod assertPointsToAnalysisMethod(AnalysisMethod aMethod)
public AnalysisType addRootClass(Class<?> clazz, boolean addFields, boolean addArrayClass)
ReachabilityAnalysisclazz - class to be markedaddFields - if true, all instance fiels are marked as accessedaddArrayClass - if true, the array class is registered as wellpublic AnalysisType addRootClass(AnalysisType type, boolean addFields, boolean addArrayClass)
public AnalysisType addRootField(Class<?> clazz, String fieldName)
ReachabilityAnalysispublic AnalysisType addRootStaticField(Class<?> clazz, String fieldName)
public void checkUserLimitations()
BigBangpublic void postFlow(TypeFlow<?> operation)
public boolean finish()
throws InterruptedException
InterruptedExceptionpublic boolean doTypeflow()
throws InterruptedException
InterruptedExceptionpublic static ForkJoinPool createExecutor(org.graalvm.compiler.debug.DebugContext debug, int numberOfThreads)
public void onTypeInstantiated(AnalysisType type, AnalysisType.UsageKind usageKind)