public class SubstrateOptimizedCallTarget extends org.graalvm.compiler.truffle.runtime.OptimizedCallTarget implements SubstrateCompilableTruffleAST
SubstrateOptimizedCallTargetInstalledCode. At most one piece of code is
valid as an entry point for new invocations at any given time, but arbitrarily many
pieces of code for this call target can be alive at the same time (for example, from
previous lower-tier compilations).
Assume that methods such as SubstrateOptimizedCallTarget.isValid() or SubstrateOptimizedCallTarget.getCodeAddress() return stale values
because internal state can change at any safepoint. Consistent reads of such values require
ensuring the absence of safepoint checks and preventing floating reads and read elimination.
| Modifier and Type | Field and Description |
|---|---|
protected SubstrateOptimizedCallTargetInstalledCode |
installedCode
Stores the most recently installed code, which is the only entry point for this call target
at one point in time (or not an entry point, if invalid).
|
| Constructor and Description |
|---|
SubstrateOptimizedCallTarget(org.graalvm.compiler.truffle.runtime.OptimizedCallTarget sourceCallTarget,
com.oracle.truffle.api.nodes.RootNode rootNode) |
accept, asJavaConstant, calculateNonTrivialNodes, call, callBoundary, callDirect, callIndirect, callInlined, callOSR, compile, compiledTier, computeBlockCompilations, createFrame, dequeueInlined, ensureInitialized, equals, firstTierCall, getCallAndLoopCount, getCallCount, getCallNodes, getCallSiteForSplit, getCompilerOptions, getDebugProperties, getInitializedArgumentsProfile, getInitializedReturnProfile, getInitializedTimestamp, getKnownCallSiteCount, getName, getNodeRewritingAssumptionConstant, getNonTrivialNodeCount, getOptionValue, getOptionValues, getRootNode, getSingleCallNode, getSourceCallTarget, getValidRootAssumptionConstant, hashCode, highestCompiledTier, injectArgumentsProfile, invalidate, isInitialized, isSameOrSplit, isSingleCaller, isSplit, isSubmittedForCompilation, isTrivial, log, maybeWaitForTask, needsCompile, nodeReplaced, onCompilationFailed, onInvalidate, prepareForAOT, profileArguments, profiledPERoot, resetCompilationProfile, resetNeedsSplit, runtime, shouldCompile, toString, waitForCompilation, wasExecutedclone, finalize, getClass, notify, notifyAll, wait, wait, waitasJavaConstant, dequeueInlined, getCallCount, getCallNodes, getKnownCallSiteCount, getName, getNodeRewritingAssumptionConstant, getNonTrivialNodeCount, getValidRootAssumptionConstant, isSameOrSplit, isTrivial, onCompilationFailed, serializeExceptionprotected SubstrateOptimizedCallTargetInstalledCode installedCode
null.
Does not need to be volatile because it is modified only in safepoint operations. Reads of this field must be done carefully so they cannot float across safepoint checks.
public SubstrateOptimizedCallTarget(org.graalvm.compiler.truffle.runtime.OptimizedCallTarget sourceCallTarget,
com.oracle.truffle.api.nodes.RootNode rootNode)
public SubstrateSpeculationLog getSpeculationLog()
getSpeculationLog in class org.graalvm.compiler.truffle.runtime.OptimizedCallTargetpublic jdk.vm.ci.meta.SpeculationLog getCompilationSpeculationLog()
getCompilationSpeculationLog in interface org.graalvm.compiler.truffle.common.CompilableTruffleASTpublic boolean isValid()
isValid in class org.graalvm.compiler.truffle.runtime.OptimizedCallTargetpublic boolean isValidLastTier()
isValidLastTier in class org.graalvm.compiler.truffle.runtime.OptimizedCallTargetpublic long getCodeAddress()
getCodeAddress in class org.graalvm.compiler.truffle.runtime.OptimizedCallTargetpublic static void safepointBarrier()
SubstrateTruffleGraphBuilderPlugins.public Object doInvoke(Object[] args)
doInvoke in class org.graalvm.compiler.truffle.runtime.OptimizedCallTargetpublic boolean cancelCompilation(CharSequence reason)
cancelCompilation in interface org.graalvm.compiler.truffle.common.CompilableTruffleASTcancelCompilation in class org.graalvm.compiler.truffle.runtime.OptimizedCallTargetpublic jdk.vm.ci.code.InstalledCode createPreliminaryInstalledCode()
SubstrateCompilableTruffleASTInstalledCode object for code installation, as required by
infrastructure, but this object does not need to be the same SubstrateInstalledCode
object that is eventually installed in the code cache. Once the provisional object is passed
to SubstrateCodeCacheProvider, it creates the final SubstrateInstalledCode
object and invokes SubstrateInstalledCode.setAddress(long, jdk.vm.ci.meta.ResolvedJavaMethod) on it.createPreliminaryInstalledCode in interface SubstrateCompilableTruffleASTSubstrateCodeCacheProviderpublic SubstrateOptimizedCallTargetInstalledCode createSubstrateInstalledCode()
createSubstrateInstalledCode in interface SubstrateInstalledCode.Factoryprotected void onCodeInstalled(SubstrateOptimizedCallTargetInstalledCode code)
SubstrateOptimizedCallTargetInstalledCode.setAddress(long, jdk.vm.ci.meta.ResolvedJavaMethod) for code
representing this call target.protected void onCodeCleared(SubstrateOptimizedCallTargetInstalledCode code)
SubstrateOptimizedCallTargetInstalledCode.clearAddress() for code
representing this call target. The caller can, however, be older code and not the current
entry point, so that code != installedCode.protected SubstrateOptimizedCallTargetInstalledCode createInitializationInstalledCode()
SubstrateOptimizedCallTarget.installedCode so it is never null.