Top Description Methods
jdk.vm.ci.code

public Interface CodeCacheProvider

Known Direct Implementers
jdk.vm.ci.hotspot.HotSpotCodeCacheProvider
Imports
jdk.vm.ci.code.site.Call, .Mark, jdk.vm.ci.meta.ResolvedJavaMethod, .SpeculationLog

Access to code cache related details and requirements.

Method Summary

Modifier and TypeMethod and Description
public default InstalledCode

Returns:

a reference to the ready-to-run code
addCode
(ResolvedJavaMethod
a method implemented by the installed code
method
,
CompiledCode
the compiled code to be added
compiledCode
,
SpeculationLog
the speculation log to be used
log
,
InstalledCode
a predefined InstalledCode object to use as a reference to the installed code. If null, a new InstalledCode object will be created.
installedCode
)

Installs code for a given method based on a given compilation result without making it the default implementation of the method.

public SpeculationLog
createSpeculationLog()

Create a new speculation log for the target runtime.

public default String
getMarkName(Mark mark)

Gets a name for a Mark mark.

public long
getMaxCallTargetOffset(long address)

Returns the maximum absolute offset of a PC relative call to a given address from any position in the code cache or -1 when not applicable.

public int

Returns:

the minimum size of the outgoing parameter area in bytes
getMinimumOutgoingSize
()

Minimum size of the stack area reserved for outgoing parameters.

public RegisterConfig
getRegisterConfig()

Gets the register configuration to use when compiling a given method.

public TargetDescription
getTarget()

Gets a description of the target architecture.

public default String
getTargetName(Call call)

Gets a name for the target of a Call.

public InstalledCode

Returns:

a reference to the compiled and ready-to-run installed code
installCode
(ResolvedJavaMethod
the method compiled to produce compiledCode or null if the input to compResult was not a ResolvedJavaMethod
method
,
CompiledCode
the compiled code to be added
compiledCode
,
InstalledCode
a pre-allocated InstalledCode object to use as a reference to the installed code. If null, a new InstalledCode object will be created.
installedCode
,
SpeculationLog
the speculation log to be used
log
,
boolean
specifies if the installed code should be made the default implementation of compRequest.getMethod(). The default implementation for a method is the code executed for standard calls to the method. This argument is ignored if compRequest == null.
isDefault
)

Installs code based on a given compilation result.

public void
invalidateInstalledCode(InstalledCode installedCode)

Invalidates installedCode such that InvalidInstalledCodeException will be raised the next time installedCode is executed.

public default InstalledCode

Returns:

a reference to the ready-to-run code
setDefaultCode
(ResolvedJavaMethod
a method implemented by the installed code and for which the installed code becomes the default implementation
method
,
CompiledCode
the compiled code to be added
compiledCode
)

Installs code for a given method based on a given compilation result and makes it the default implementation of the method.

public boolean
shouldDebugNonSafepoints()

Determines if debug info should also be emitted at non-safepoint locations.

Method Detail

addCodeback to summary
public default InstalledCode addCode(ResolvedJavaMethod method, CompiledCode compiledCode, SpeculationLog log, InstalledCode installedCode)

Installs code for a given method based on a given compilation result without making it the default implementation of the method.

Parameters
method:ResolvedJavaMethod

a method implemented by the installed code

compiledCode:CompiledCode

the compiled code to be added

log:SpeculationLog

the speculation log to be used

installedCode:InstalledCode

a predefined InstalledCode object to use as a reference to the installed code. If null, a new InstalledCode object will be created.

Returns:InstalledCode

a reference to the ready-to-run code

Exceptions
BailoutException:
if the code installation failed
IllegalArgumentException:
if installedCode != null and this object does not support a predefined InstalledCode object
createSpeculationLogback to summary
public SpeculationLog createSpeculationLog()

Create a new speculation log for the target runtime.

getMarkNameback to summary
public default String getMarkName(Mark mark)

Gets a name for a Mark mark.

getMaxCallTargetOffsetback to summary
public long getMaxCallTargetOffset(long address)

Returns the maximum absolute offset of a PC relative call to a given address from any position in the code cache or -1 when not applicable. Intended for determining the required size of address/offset fields.

getMinimumOutgoingSizeback to summary
public int getMinimumOutgoingSize()

Minimum size of the stack area reserved for outgoing parameters. This area is reserved in all cases, even when the compiled method has no regular call instructions.

Returns:int

the minimum size of the outgoing parameter area in bytes

getRegisterConfigback to summary
public RegisterConfig getRegisterConfig()

Gets the register configuration to use when compiling a given method.

getTargetback to summary
public TargetDescription getTarget()

Gets a description of the target architecture.

getTargetNameback to summary
public default String getTargetName(Call call)

Gets a name for the target of a Call.

installCodeback to summary
public InstalledCode installCode(ResolvedJavaMethod method, CompiledCode compiledCode, InstalledCode installedCode, SpeculationLog log, boolean isDefault)

Installs code based on a given compilation result.

Parameters
method:ResolvedJavaMethod

the method compiled to produce compiledCode or null if the input to compResult was not a ResolvedJavaMethod

compiledCode:CompiledCode

the compiled code to be added

installedCode:InstalledCode

a pre-allocated InstalledCode object to use as a reference to the installed code. If null, a new InstalledCode object will be created.

log:SpeculationLog

the speculation log to be used

isDefault:boolean

specifies if the installed code should be made the default implementation of compRequest.getMethod(). The default implementation for a method is the code executed for standard calls to the method. This argument is ignored if compRequest == null.

Returns:InstalledCode

a reference to the compiled and ready-to-run installed code

Exceptions
BailoutException:
if the code installation failed
invalidateInstalledCodeback to summary
public void invalidateInstalledCode(InstalledCode installedCode)

Invalidates installedCode such that InvalidInstalledCodeException will be raised the next time installedCode is executed.

setDefaultCodeback to summary
public default InstalledCode setDefaultCode(ResolvedJavaMethod method, CompiledCode compiledCode)

Installs code for a given method based on a given compilation result and makes it the default implementation of the method.

Parameters
method:ResolvedJavaMethod

a method implemented by the installed code and for which the installed code becomes the default implementation

compiledCode:CompiledCode

the compiled code to be added

Returns:InstalledCode

a reference to the ready-to-run code

Exceptions
BailoutException:
if the code installation failed
IllegalArgumentException:
if installedCode != null and this object does not support a predefined InstalledCode object
shouldDebugNonSafepointsback to summary
public boolean shouldDebugNonSafepoints()

Determines if debug info should also be emitted at non-safepoint locations.