public abstract class PointsToAnalysis extends Object implements BigBang
| 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 |
|---|---|
Timer |
analysisTimer |
Timer |
checkObjectsTimer |
protected boolean |
extendedAsserts |
protected HostVM |
hostVM |
protected AnalysisMetaAccess |
metaAccess |
AtomicLong |
numParsedGraphs |
Timer |
processFeaturesTimer |
protected boolean |
reportAnalysisStatistics |
protected boolean |
trackTypeFlowInputs |
Timer |
typeFlowTimer |
protected AnalysisUniverse |
universe |
| Constructor and Description |
|---|
PointsToAnalysis(org.graalvm.compiler.options.OptionValues options,
AnalysisUniverse universe,
HostedProviders providers,
HostVM hostVM,
ForkJoinPool executorService,
Runnable heartbeatCallback,
UnsupportedFeatures unsupportedFeatures,
boolean strengthenGraalGraphs) |
| Modifier and Type | Method and Description |
|---|---|
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)
Marks given method as reachable.
|
AnalysisMethod |
addRootMethod(Class<?> clazz,
String methodName,
Class<?>... parameterTypes)
Marks given method as reachable.
|
AnalysisMethod |
addRootMethod(Executable method)
Marks given method as reachable.
|
AnalysisType |
addRootStaticField(Class<?> clazz,
String fieldName) |
AnalysisPolicy |
analysisPolicy() |
static PointsToAnalysisMethod |
assertPointsToAnalysisMethod(AnalysisMethod aMethod) |
protected void |
checkObjectGraph(ObjectScanner objectScanner)
Traverses the object graph to discover references to new types.
|
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.
|
AnalysisContextPolicy<AnalysisContext> |
contextPolicy() |
static ForkJoinPool |
createExecutor(org.graalvm.compiler.debug.DebugContext debug,
int numberOfThreads) |
MethodTypeFlowBuilder |
createMethodTypeFlowBuilder(PointsToAnalysis bb,
MethodTypeFlow methodFlow) |
boolean |
doTypeflow() |
boolean |
executorIsStarted() |
boolean |
extendedAsserts() |
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() |
TypeState |
getAllInstantiatedTypes() |
TypeFlow<?> |
getAllSynchronizedTypeFlow() |
TypeState |
getAllSynchronizedTypeState() |
Timer |
getAnalysisTimer() |
org.graalvm.compiler.core.common.spi.ConstantFieldProvider |
getConstantFieldProvider() |
jdk.vm.ci.meta.ConstantReflectionProvider |
getConstantReflectionProvider() |
org.graalvm.compiler.debug.DebugContext |
getDebug() |
List<org.graalvm.compiler.debug.DebugHandlersFactory> |
getDebugHandlerFactories() |
CompletionExecutor |
getExecutor() |
AnalysisType |
getGraalNodeListType() |
AnalysisType |
getGraalNodeType() |
Runnable |
getHeartbeatCallback() |
HostVM |
getHostVM() |
AnalysisMetaAccess |
getMetaAccess() |
AnalysisType |
getObjectArrayType() |
AnalysisType |
getObjectType() |
org.graalvm.compiler.options.OptionValues |
getOptions() |
Timer |
getProcessFeaturesTimer() |
HostedProviders |
getProviders() |
org.graalvm.compiler.nodes.spi.Replacements |
getReplacements() |
org.graalvm.compiler.api.replacements.SnippetReflectionProvider |
getSnippetReflectionProvider() |
AnalysisType |
getThreadType() |
AnalysisType |
getThrowableType() |
AnalysisUniverse |
getUniverse() |
UnsupportedFeatures |
getUnsupportedFeatures() |
AnalysisType |
lookup(jdk.vm.ci.meta.JavaType type) |
void |
postFlow(TypeFlow<?> operation) |
void |
postTask(CompletionExecutor.DebugContextRunnable task) |
void |
printTimers()
Prints all analysis timers.
|
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() |
void |
runAnalysis(org.graalvm.compiler.debug.DebugContext debugContext,
Function<AnalysisUniverse,Boolean> analysisEndCondition)
Iterate until analysis reaches a fixpoint.
|
HeapScanningPolicy |
scanningPolicy() |
AnalysisType[] |
skippedHeapTypes() |
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() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisCallAllowedprotected final AnalysisUniverse universe
protected final AnalysisMetaAccess metaAccess
protected final HostVM hostVM
protected final boolean trackTypeFlowInputs
protected final boolean reportAnalysisStatistics
protected final boolean extendedAsserts
public final AtomicLong numParsedGraphs
public final Timer typeFlowTimer
public final Timer checkObjectsTimer
public final Timer processFeaturesTimer
public final Timer analysisTimer
public PointsToAnalysis(org.graalvm.compiler.options.OptionValues options,
AnalysisUniverse universe,
HostedProviders providers,
HostVM hostVM,
ForkJoinPool executorService,
Runnable heartbeatCallback,
UnsupportedFeatures unsupportedFeatures,
boolean strengthenGraalGraphs)
public Timer getAnalysisTimer()
getAnalysisTimer in interface BigBangpublic Timer getProcessFeaturesTimer()
getProcessFeaturesTimer in interface BigBangpublic void printTimers()
BigBangprintTimers in interface BigBangpublic void printTimerStatistics(PrintWriter out)
BigBangprintTimerStatistics in interface BigBangpublic boolean strengthenGraalGraphs()
public AnalysisType[] skippedHeapTypes()
skippedHeapTypes in interface HeapScanningpublic Runnable getHeartbeatCallback()
getHeartbeatCallback in interface BigBangpublic boolean trackTypeFlowInputs()
public boolean reportAnalysisStatistics()
public boolean extendedAsserts()
extendedAsserts in interface BigBangpublic org.graalvm.compiler.options.OptionValues getOptions()
getOptions in interface BigBangpublic List<org.graalvm.compiler.debug.DebugHandlersFactory> getDebugHandlerFactories()
getDebugHandlerFactories in interface BigBangpublic org.graalvm.compiler.debug.DebugContext getDebug()
public MethodTypeFlowBuilder createMethodTypeFlowBuilder(PointsToAnalysis bb, MethodTypeFlow methodFlow)
public void registerUnsafeLoad(OffsetLoadTypeFlow.AbstractUnsafeLoadTypeFlow unsafeLoad)
public void registerUnsafeStore(OffsetStoreTypeFlow.AbstractUnsafeStoreTypeFlow unsafeStore)
public void forceUnsafeUpdate(AnalysisField field)
ReachabilityAnalysisforceUnsafeUpdate in interface 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)
ReachabilityAnalysisregisterAsJNIAccessed in interface ReachabilityAnalysispublic boolean trackConcreteAnalysisObjects(AnalysisType type)
public void cleanupAfterAnalysis()
ReachabilityAnalysiscleanupAfterAnalysis in interface ReachabilityAnalysispublic AnalysisPolicy analysisPolicy()
analysisPolicy in interface ReachabilityAnalysispublic AnalysisContextPolicy<AnalysisContext> contextPolicy()
public AnalysisUniverse getUniverse()
getUniverse in interface ReachabilityAnalysispublic HostedProviders getProviders()
getProviders in interface BigBangpublic AnalysisMetaAccess getMetaAccess()
getMetaAccess in interface ReachabilityAnalysispublic org.graalvm.compiler.nodes.spi.Replacements getReplacements()
public UnsupportedFeatures getUnsupportedFeatures()
getUnsupportedFeatures in interface BigBangpublic AnalysisType lookup(jdk.vm.ci.meta.JavaType type)
public AnalysisType getObjectType()
public AnalysisType getObjectArrayType()
public AnalysisType getGraalNodeType()
public AnalysisType getGraalNodeListType()
public AnalysisType getThrowableType()
public AnalysisType getThreadType()
public TypeFlow<?> getAllInstantiatedTypeFlow()
public TypeState getAllInstantiatedTypes()
public TypeFlow<?> getAllSynchronizedTypeFlow()
public TypeState getAllSynchronizedTypeState()
getAllSynchronizedTypeState in interface ReachabilityAnalysispublic boolean executorIsStarted()
public AnalysisMethod addRootMethod(Executable method)
ReachabilityAnalysisaddRootMethod in interface ReachabilityAnalysispublic AnalysisMethod addRootMethod(AnalysisMethod aMethod)
ReachabilityAnalysisaddRootMethod in interface ReachabilityAnalysispublic static PointsToAnalysisMethod assertPointsToAnalysisMethod(AnalysisMethod aMethod)
public AnalysisType addRootClass(Class<?> clazz, boolean addFields, boolean addArrayClass)
ReachabilityAnalysisaddRootClass in interface ReachabilityAnalysisclazz - class to be markedaddFields - if true, all instance fiels are marked as accessedaddArrayClass - if true, the array class is registered as wellpublic AnalysisType addRootField(Class<?> clazz, String fieldName)
ReachabilityAnalysisaddRootField in interface ReachabilityAnalysispublic AnalysisType addRootStaticField(Class<?> clazz, String fieldName)
public AnalysisMethod addRootMethod(Class<?> clazz, String methodName, Class<?>... parameterTypes)
ReachabilityAnalysisaddRootMethod in interface ReachabilityAnalysispublic final org.graalvm.compiler.api.replacements.SnippetReflectionProvider getSnippetReflectionProvider()
getSnippetReflectionProvider in interface BigBangpublic final jdk.vm.ci.meta.ConstantReflectionProvider getConstantReflectionProvider()
getConstantReflectionProvider in interface BigBangpublic org.graalvm.compiler.core.common.spi.ConstantFieldProvider getConstantFieldProvider()
public CompletionExecutor getExecutor()
public void checkUserLimitations()
BigBangcheckUserLimitations in interface BigBangpublic void postFlow(TypeFlow<?> operation)
public void postTask(CompletionExecutor.DebugContextRunnable task)
public boolean finish()
throws InterruptedException
finish in interface ReachabilityAnalysisInterruptedExceptionpublic boolean doTypeflow()
throws InterruptedException
InterruptedExceptionpublic HeapScanningPolicy scanningPolicy()
scanningPolicy in interface HeapScanningprotected void checkObjectGraph(ObjectScanner objectScanner)
objectScanner - public void runAnalysis(org.graalvm.compiler.debug.DebugContext debugContext,
Function<AnalysisUniverse,Boolean> analysisEndCondition)
throws InterruptedException
runAnalysis in interface BigBangdebugContext - debug contextanalysisEndCondition - hook for actions to be taken during analysis. It also dictates
when the analysis should end, i.e., it returns true if no more iterations are
required.
When the analysis is used for Native Image generation the actions could for
example be specified via
Feature.duringAnalysis(Feature.DuringAnalysisAccess).
The ending condition could be provided by
Feature.DuringAnalysisAccess.requireAnalysisIteration().AnalysisError - if the analysis failsInterruptedExceptionpublic static ForkJoinPool createExecutor(org.graalvm.compiler.debug.DebugContext debug, int numberOfThreads)