public abstract class AbstractHotSpotTruffleRuntime extends GraalTruffleRuntime implements HotSpotTruffleCompilerRuntime
GraalTruffleRuntime.KnownMethods, GraalTruffleRuntime.StackTraceHelperTruffleCompilerRuntime.ConstantFieldInfo, TruffleCompilerRuntime.InlineKind, TruffleCompilerRuntime.LoopExplosionKindknownMethods, truffleCompiler| Constructor and Description |
|---|
AbstractHotSpotTruffleRuntime() |
| Modifier and Type | Method and Description |
|---|---|
protected <T> T |
asObject(Class<T> type,
JavaConstant constant) |
void |
bypassedInstalledCode(OptimizedCallTarget target)
Notifies this runtime when a Truffle AST is being executed in the Truffle interpreter even
though compiled code is available for the AST.
|
boolean |
bypassedReservedOop(boolean waitForInit) |
OptimizedCallTarget |
createOptimizedCallTarget(OptimizedCallTarget source,
com.oracle.truffle.api.nodes.RootNode rootNode) |
SpeculationLog |
createSpeculationLog()
Creates a log that
HotSpotSpeculationLog#managesFailedSpeculations() manages a native
failed speculations list. |
protected JavaConstant |
forObject(Object object) |
protected int |
getArrayBaseOffset(Class<?> componentType) |
protected int |
getArrayIndexScale(Class<?> componentType) |
protected int |
getBaseInstanceSize(Class<?> type) |
BackgroundCompileQueue |
getCompileQueue() |
protected String |
getCompilerConfigurationName()
This method allows retrieval of the compiler configuration without requiring to initialize
the
TruffleCompiler with
getTruffleCompiler. |
protected com.oracle.truffle.api.impl.AbstractFastThreadLocal |
getFastThreadLocalImpl() |
protected Object |
getFieldValue(ResolvedJavaField resolvedJavaField,
Object obj) |
MethodHandle |
getGetThreadLocalObject() |
int |
getJVMCIReservedLongOffset0() |
GraalTruffleRuntime.KnownMethods |
getKnownMethods() |
protected int |
getObjectAlignment() |
protected Object[] |
getResolvedFields(Class<?> type,
boolean includePrimitive,
boolean includeSuperclasses) |
static AbstractHotSpotTruffleRuntime |
getRuntime()
Gets the singleton runtime instance.
|
MethodHandle |
getSetThreadLocalObject() |
protected StackIntrospection |
getStackIntrospection() |
long |
getStackOverflowLimit() |
com.oracle.truffle.api.impl.ThreadLocalHandshake |
getThreadLocalHandshake() |
HotSpotTruffleCompiler |
getTruffleCompiler(CompilableTruffleAST compilable)
Gets the primary
TruffleCompiler instance associated with this runtime, creating and
initializing it in a thread-safe manner first if necessary. |
protected abstract String |
initLazyCompilerConfigurationName()
Gets the compiler configuration name without requiring a compiler to be created.
|
boolean |
isLatestJVMCI() |
boolean |
isProfilingEnabled() |
void |
notifyTransferToInterpreter() |
void |
onCodeInstallation(CompilableTruffleAST compilable,
InstalledCode installedCode)
Notifies this runtime once
installedCode has been installed in the code cache. |
void |
resetCompiler() |
static void |
setDontInlineCallBoundaryMethod(List<ResolvedJavaMethod> callBoundaryMethods) |
addListener, asCompilableTruffleAST, clearState, compilationThresholdScale, createAssumption, createAssumption, createDirectCallNode, createIndirectCallNode, createLoopNode, createMaterializedFrame, createMaterializedFrame, createVirtualFrame, doCompile, doCompile, finishCompilation, getCallTargetForCallNode, getCapability, getCompilationQueueSize, getCompilerIdleDelay, getConstantFieldInfo, getEngineCacheSupport, getEngineData, getFrameMaterializeCalled, getFrameSlotKindTagForJavaKind, getFrameSlotKindTagsCount, getInlineKind, getJavaKindForFrameSlotKind, getListener, getLookupTypes, getLoopExplosionKind, getLoopNodeFactory, getName, getOptionsForCompiler, getTestTvmci, getTvmci, initializeKnownMethods, installDefaultListeners, isBytecodeInterpreterSwitch, isBytecodeInterpreterSwitchBoundary, isInInterpreter, isInlineable, isPrintGraphEnabled, isSpecializationMethod, isSuppressedFailure, isSuppressedTruffleRuntimeException, isTransferToInterpreterMethod, isTruffleBoundary, isValueType, iterateFrames, log, markFrameMaterializeCalled, newTruffleCompiler, openCompilerThreadScope, printStackTraceToString, registerOptimizedAssumptionDependency, removeListener, resolveType, searchMethod, submitForCompilation, waitForCompilationclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasCompilableTruffleAST, formatEvent, getCallTargetForCallNode, getConstantFieldInfo, getFrameSlotKindTagForJavaKind, getFrameSlotKindTagsCount, getGraalOptions, getInlineKind, getJavaKindForFrameSlotKind, getLoopExplosionKind, getRuntimeIfAvailable, isBytecodeInterpreterSwitch, isBytecodeInterpreterSwitchBoundary, isInInterpreter, isInlineable, isSpecializationMethod, isSuppressedFailure, isTransferToInterpreterMethod, isTruffleBoundary, isValueType, log, log, logEvent, logEvent, registerOptimizedAssumptionDependency, resolveType, resolveTypepublic final int getJVMCIReservedLongOffset0()
public final com.oracle.truffle.api.impl.ThreadLocalHandshake getThreadLocalHandshake()
getThreadLocalHandshake in class GraalTruffleRuntimeprotected StackIntrospection getStackIntrospection()
getStackIntrospection in class GraalTruffleRuntimepublic HotSpotTruffleCompiler getTruffleCompiler(CompilableTruffleAST compilable)
TruffleCompilerRuntimeTruffleCompiler instance associated with this runtime, creating and
initializing it in a thread-safe manner first if necessary.getTruffleCompiler in interface TruffleCompilerRuntimepublic boolean isLatestJVMCI()
isLatestJVMCI in class GraalTruffleRuntimepublic final void resetCompiler()
public final OptimizedCallTarget createOptimizedCallTarget(OptimizedCallTarget source, com.oracle.truffle.api.nodes.RootNode rootNode)
createOptimizedCallTarget in class GraalTruffleRuntimepublic void onCodeInstallation(CompilableTruffleAST compilable, InstalledCode installedCode)
HotSpotTruffleCompilerRuntimeinstalledCode has been installed in the code cache.onCodeInstallation in interface HotSpotTruffleCompilerRuntimecompilable - the compilable to install code intoinstalledCode - code that has just been installed in the code cachepublic SpeculationLog createSpeculationLog()
HotSpotSpeculationLog#managesFailedSpeculations() manages a native
failed speculations list. An important invariant is that an nmethod compiled with this log
can never be executing once the log object dies. When the log object dies, it frees the
failed speculations list thus invalidating the
HotSpotSpeculationLog#getFailedSpeculationsAddress() failed speculations address
embedded in the nmethod. If the nmethod were to execute after this point and fail a
speculation, it would append the failed speculation to the already freed list.
Truffle ensures this cannot happen as it only attaches managed speculation logs to
OptimizedCallTargets and OptimizedOSRLoopNodes. Executions of nmethods
compiled for an OptimizedCallTarget or OptimizedOSRLoopNode object will have
a strong reference to the object (i.e., as the receiver). This guarantees that such an
nmethod cannot be executing after the object has died.
createSpeculationLog in class GraalTruffleRuntimepublic static void setDontInlineCallBoundaryMethod(List<ResolvedJavaMethod> callBoundaryMethods)
public BackgroundCompileQueue getCompileQueue()
getCompileQueue in class GraalTruffleRuntimeprotected String getCompilerConfigurationName()
GraalTruffleRuntimeTruffleCompiler with
getTruffleCompiler. The result of this method should always match
TruffleCompiler.getCompilerConfigurationName().getCompilerConfigurationName in class GraalTruffleRuntimeprotected abstract String initLazyCompilerConfigurationName()
public void bypassedInstalledCode(OptimizedCallTarget target)
GraalTruffleRuntimebypassedInstalledCode in class GraalTruffleRuntimepublic MethodHandle getSetThreadLocalObject()
public MethodHandle getGetThreadLocalObject()
public boolean bypassedReservedOop(boolean waitForInit)
public GraalTruffleRuntime.KnownMethods getKnownMethods()
getKnownMethods in class GraalTruffleRuntimepublic final void notifyTransferToInterpreter()
notifyTransferToInterpreter in interface com.oracle.truffle.api.TruffleRuntimepublic final boolean isProfilingEnabled()
isProfilingEnabled in interface com.oracle.truffle.api.TruffleRuntimeprotected JavaConstant forObject(Object object)
forObject in class GraalTruffleRuntimeprotected int getBaseInstanceSize(Class<?> type)
getBaseInstanceSize in class GraalTruffleRuntimeprotected Object[] getResolvedFields(Class<?> type, boolean includePrimitive, boolean includeSuperclasses)
getResolvedFields in class GraalTruffleRuntimeprotected Object getFieldValue(ResolvedJavaField resolvedJavaField, Object obj)
getFieldValue in class GraalTruffleRuntimeprotected int getObjectAlignment()
getObjectAlignment in class GraalTruffleRuntimeprotected int getArrayIndexScale(Class<?> componentType)
getArrayIndexScale in class GraalTruffleRuntimeprotected int getArrayBaseOffset(Class<?> componentType)
getArrayBaseOffset in class GraalTruffleRuntimepublic long getStackOverflowLimit()
getStackOverflowLimit in class GraalTruffleRuntimeprotected <T> T asObject(Class<T> type, JavaConstant constant)
asObject in class GraalTruffleRuntimeprotected com.oracle.truffle.api.impl.AbstractFastThreadLocal getFastThreadLocalImpl()
getFastThreadLocalImpl in class GraalTruffleRuntimepublic static AbstractHotSpotTruffleRuntime getRuntime()
TruffleCompilerRuntimegetRuntime in interface TruffleCompilerRuntime