public class HotSpotCodeCacheProvider extends Object implements CodeCacheProvider
CodeCacheProvider.| Modifier and Type | Field and Description |
|---|---|
HotSpotVMConfig |
config |
protected RegisterConfig |
regConfig |
protected HotSpotJVMCIRuntimeProvider |
runtime |
protected TargetDescription |
target |
| Constructor and Description |
|---|
HotSpotCodeCacheProvider(HotSpotJVMCIRuntimeProvider runtime,
HotSpotVMConfig config,
TargetDescription target,
RegisterConfig regConfig) |
| Modifier and Type | Method and Description |
|---|---|
HotSpotNmethod |
addExternalMethod(ResolvedJavaMethod method,
CompilationResult compResult) |
InstalledCode |
addMethod(ResolvedJavaMethod method,
CompilationResult compResult,
SpeculationLog log,
InstalledCode predefinedInstalledCode)
Adds the given compilation result as an implementation of the given method without making it
the default implementation.
|
DataSection.Data |
createDataItem(Constant constant)
|
SpeculationLog |
createSpeculationLog()
Create a new speculation log for the target runtime.
|
String |
disassemble(InstalledCode code) |
String |
getMarkName(CompilationResult.Mark mark)
Gets a name for a
CompilationResult.Mark mark. |
int |
getMinimumOutgoingSize()
Minimum size of the stack area reserved for outgoing parameters.
|
RegisterConfig |
getRegisterConfig()
Gets the register configuration to use when compiling a given method.
|
TargetDescription |
getTarget()
Gets a description of the target architecture.
|
String |
getTargetName(CompilationResult.Call call)
Decodes a call target to a mnemonic if possible.
|
InstalledCode |
installMethod(HotSpotResolvedJavaMethod method,
CompilationResult compResult,
long jvmciEnv,
boolean isDefault) |
InstalledCode |
logOrDump(InstalledCode installedCode,
CompilationResult compResult) |
boolean |
needsDataPatch(JavaConstant constant)
Determines if a
CompilationResult.DataPatch should be created for a given primitive constant that is
part of a CompilationResult. |
InstalledCode |
setDefaultMethod(ResolvedJavaMethod method,
CompilationResult compResult)
Sets the given compilation result as the default implementation of the given method.
|
protected final HotSpotJVMCIRuntimeProvider runtime
public final HotSpotVMConfig config
protected final TargetDescription target
protected final RegisterConfig regConfig
public HotSpotCodeCacheProvider(HotSpotJVMCIRuntimeProvider runtime, HotSpotVMConfig config, TargetDescription target, RegisterConfig regConfig)
public String getMarkName(CompilationResult.Mark mark)
CodeCacheProviderCompilationResult.Mark mark.getMarkName in interface CodeCacheProviderpublic String getTargetName(CompilationResult.Call call)
getTargetName in interface CodeCacheProviderpublic RegisterConfig getRegisterConfig()
CodeCacheProvidergetRegisterConfig in interface CodeCacheProviderpublic int getMinimumOutgoingSize()
CodeCacheProvidergetMinimumOutgoingSize in interface CodeCacheProviderpublic InstalledCode logOrDump(InstalledCode installedCode, CompilationResult compResult)
public InstalledCode installMethod(HotSpotResolvedJavaMethod method, CompilationResult compResult, long jvmciEnv, boolean isDefault)
public InstalledCode addMethod(ResolvedJavaMethod method, CompilationResult compResult, SpeculationLog log, InstalledCode predefinedInstalledCode)
CodeCacheProvideraddMethod in interface CodeCacheProvidermethod - a method to which the executable code is begin addedcompResult - the compilation result to be addedlog - the speculation log to be usedBailoutException if the code installation failedpublic InstalledCode setDefaultMethod(ResolvedJavaMethod method, CompilationResult compResult)
CodeCacheProvidersetDefaultMethod in interface CodeCacheProvidermethod - a method to which the executable code is begin addedcompResult - the compilation result to be addedpublic HotSpotNmethod addExternalMethod(ResolvedJavaMethod method, CompilationResult compResult)
public boolean needsDataPatch(JavaConstant constant)
CodeCacheProviderCompilationResult.DataPatch should be created for a given primitive constant that is
part of a CompilationResult. A data patch is always created for an object constant.needsDataPatch in interface CodeCacheProviderpublic DataSection.Data createDataItem(Constant constant)
CodeCacheProvidercreateDataItem in interface CodeCacheProviderpublic TargetDescription getTarget()
CodeCacheProvidergetTarget in interface CodeCacheProviderpublic String disassemble(InstalledCode code)
public SpeculationLog createSpeculationLog()
CodeCacheProvidercreateSpeculationLog in interface CodeCacheProvider