public final class HotSpotTruffleCompilerImpl extends TruffleCompilerImpl implements HotSpotTruffleCompiler
| Modifier and Type | Class and Description |
|---|---|
static class |
HotSpotTruffleCompilerImpl.Options |
TruffleCompilerImpl.CancellableTruffleCompilationTaskbuilderConfig, CodeInstallationMemUse, codeInstallationTaskFactory, CodeInstallationTime, CompilationMemUse, CompilationTime, config, EncodedGraphCacheBailouts, EncodedGraphCacheEvictionTime, EncodedGraphCacheRemovedEntries, Optimizations, PartialEvaluationMemUse, PartialEvaluationTime, partialEvaluatorFIRST_TIER_COMPILATION_SUFFIX, FIRST_TIER_INDEX, LAST_TIER_INDEX, SECOND_TIER_COMPILATION_SUFFIX| Constructor and Description |
|---|
HotSpotTruffleCompilerImpl(HotSpotGraalRuntimeProvider hotspotGraalRuntime,
TruffleCompilerConfiguration config) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterCodeInstallation(CompilationResult result,
InstalledCode installedCode)
Notifies this object once
installedCode has been installed in the code cache. |
static HotSpotTruffleCompilerImpl |
create(TruffleCompilerRuntime runtime) |
TruffleCompilationIdentifier |
createCompilationIdentifier(CompilableTruffleAST compilable)
Creates a new
CompilationIdentifier for compilable. |
protected CompilationResult |
createCompilationResult(String name,
CompilationIdentifier compilationIdentifier,
CompilableTruffleAST compilable)
Creates the
CompilationResult to be used for a Truffle compilation. |
protected DebugContext |
createDebugContext(OptionValues options,
CompilationIdentifier compilationId,
CompilableTruffleAST compilable,
PrintStream logStream) |
PhaseSuite<HighTierContext> |
createGraphBuilderSuite(TruffleTierConfiguration tier) |
protected InstalledCode |
createInstalledCode(CompilableTruffleAST compilable) |
protected HotSpotPartialEvaluator |
createPartialEvaluator(TruffleCompilerConfiguration configuration)
Creates the partial evaluator used by this compiler.
|
protected void |
exitHostVM(int status)
Calls
System.exit(int) in the runtime embedding the Graal compiler. |
protected CompilableTruffleAST |
getCompilable(CompilationResult result)
Gets the
CompilableTruffleAST associated with result. |
protected Map<CompilationWrapper.ExceptionAction,Integer> |
getCompilationProblemsPerAction()
Gets the map used to count the number of compilation failures or bailouts handled by each
action.
|
String |
getCompilerConfigurationName()
Returns a unique name for the configuration in use by this compiler.
|
protected DiagnosticsOutputDirectory |
getDebugOutputDirectory() |
HotSpotPartialEvaluator |
getPartialEvaluator() |
protected void |
handleBailout(DebugContext debug,
StructuredGraph graph,
BailoutException bailout,
org.graalvm.options.OptionValues options)
Hook for processing bailout exceptions.
|
void |
installTruffleCallBoundaryMethod(ResolvedJavaMethod method)
Compiles a method denoted as an entry point to truffle code invoked by the runtime.
|
void |
installTruffleReservedOopMethod(ResolvedJavaMethod method)
Compiles a method with fast thread local Truffle intrinsics.
|
int |
pendingTransferToInterpreterOffset(CompilableTruffleAST compilable) |
void |
purgePartialEvaluationCaches()
Releases caches used for PE/compilation.
|
protected boolean |
soleExecutionEntryPoint(InstalledCode installedCode)
Default nmethods installed by Graal are executed through a
Method::_code field pointing to them. |
asCompilableTruffleAST, compileAST, compilePEGraph, createPartialEvaluatorConfiguration, doCompile, getConfig, getOptionsForCompiler, getSnippetReflection, getTruffleTier, initialize, newTruffleTier, openCompilation, openDebugContext, shutdownclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdoCompile, initialize, openCompilation, openDebugContext, shutdownpublic HotSpotTruffleCompilerImpl(HotSpotGraalRuntimeProvider hotspotGraalRuntime, TruffleCompilerConfiguration config)
public static HotSpotTruffleCompilerImpl create(TruffleCompilerRuntime runtime)
public TruffleCompilationIdentifier createCompilationIdentifier(CompilableTruffleAST compilable)
TruffleCompilerImplCompilationIdentifier for compilable.
Implementations of this method must guarantee that the CompilationIdentifier.Verbosity.ID for each returned
value is unique.createCompilationIdentifier in class TruffleCompilerImplpublic String getCompilerConfigurationName()
TruffleCompilergetCompilerConfigurationName in interface TruffleCompilerprotected DebugContext createDebugContext(OptionValues options, CompilationIdentifier compilationId, CompilableTruffleAST compilable, PrintStream logStream)
createDebugContext in class TruffleCompilerImplprotected HotSpotPartialEvaluator createPartialEvaluator(TruffleCompilerConfiguration configuration)
TruffleCompilerImplcreatePartialEvaluator in class TruffleCompilerImplpublic PhaseSuite<HighTierContext> createGraphBuilderSuite(TruffleTierConfiguration tier)
createGraphBuilderSuite in class TruffleCompilerImplpublic void installTruffleCallBoundaryMethod(ResolvedJavaMethod method)
TruffleCallBoundaryInstrumentationFactory.installTruffleCallBoundaryMethod in interface HotSpotTruffleCompilerpublic void installTruffleReservedOopMethod(ResolvedJavaMethod method)
installTruffleReservedOopMethod in interface HotSpotTruffleCompilerpublic int pendingTransferToInterpreterOffset(CompilableTruffleAST compilable)
pendingTransferToInterpreterOffset in interface HotSpotTruffleCompilerprotected DiagnosticsOutputDirectory getDebugOutputDirectory()
getDebugOutputDirectory in class TruffleCompilerImplprotected Map<CompilationWrapper.ExceptionAction,Integer> getCompilationProblemsPerAction()
TruffleCompilerImplgetCompilationProblemsPerAction in class TruffleCompilerImplCompilationWrapper.CompilationWrapper(DiagnosticsOutputDirectory, Map)protected InstalledCode createInstalledCode(CompilableTruffleAST compilable)
createInstalledCode in class TruffleCompilerImplprotected boolean soleExecutionEntryPoint(InstalledCode installedCode)
Default nmethods installed by Graal are executed through a
Method::_code field pointing to them. That is, they can be executed even when the
HotSpotNmethod created during code installation dies. As such, these objects must
remain strongly reachable from OptimizedAssumptions they depend on.soleExecutionEntryPoint in class TruffleCompilerImplOptimizedAssumptionDependency.soleExecutionEntryPoint()protected void exitHostVM(int status)
TruffleCompilerImplSystem.exit(int) in the runtime embedding the Graal compiler. This will be a
different runtime than Graal's runtime in the case of libgraal.exitHostVM in class TruffleCompilerImplprotected CompilationResult createCompilationResult(String name, CompilationIdentifier compilationIdentifier, CompilableTruffleAST compilable)
TruffleCompilerImplCompilationResult to be used for a Truffle compilation.createCompilationResult in class TruffleCompilerImplprotected void afterCodeInstallation(CompilationResult result, InstalledCode installedCode)
TruffleCompilerImplinstalledCode has been installed in the code cache.afterCodeInstallation in class TruffleCompilerImplresult - the result of compilationinstalledCode - code that has just been installed in the code cacheprotected CompilableTruffleAST getCompilable(CompilationResult result)
TruffleCompilerImplCompilableTruffleAST associated with result.getCompilable in class TruffleCompilerImplresult - a CompilationResult that may have a non-null
CompilableTruffleAST associated with itpublic HotSpotPartialEvaluator getPartialEvaluator()
getPartialEvaluator in interface TruffleCompilerBasegetPartialEvaluator in class TruffleCompilerImplpublic void purgePartialEvaluationCaches()
HotSpotTruffleCompilerpurgePartialEvaluationCaches in interface HotSpotTruffleCompilerprotected void handleBailout(DebugContext debug, StructuredGraph graph, BailoutException bailout, org.graalvm.options.OptionValues options)
TruffleCompilerImplhandleBailout in class TruffleCompilerImplgraph - graph producing the bailout, can be nullbailout - to process