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)
CodeCacheProvider
CompilationResult.Mark
mark.getMarkName
in interface CodeCacheProvider
public String getTargetName(CompilationResult.Call call)
getTargetName
in interface CodeCacheProvider
public RegisterConfig getRegisterConfig()
CodeCacheProvider
getRegisterConfig
in interface CodeCacheProvider
public int getMinimumOutgoingSize()
CodeCacheProvider
getMinimumOutgoingSize
in interface CodeCacheProvider
public 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)
CodeCacheProvider
addMethod
in interface CodeCacheProvider
method
- 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)
CodeCacheProvider
setDefaultMethod
in interface CodeCacheProvider
method
- 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)
CodeCacheProvider
CompilationResult.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 CodeCacheProvider
public DataSection.Data createDataItem(Constant constant)
CodeCacheProvider
createDataItem
in interface CodeCacheProvider
public TargetDescription getTarget()
CodeCacheProvider
getTarget
in interface CodeCacheProvider
public String disassemble(InstalledCode code)
public SpeculationLog createSpeculationLog()
CodeCacheProvider
createSpeculationLog
in interface CodeCacheProvider