public final class InlinedByteValueProfile extends InlinedProfile
byte
runtime values.
Value profiles require a runtime check in their initialized state to verify their profiled
assumption. Value profiles are limited to capture monomorphic profiles only. This means that if
two or more values are profiled within a single profile then the profile has no effect. If the
value assumption is invalidated in compiled code then it is invalidated.
Usage example:
abstract class ByteProfileNode extends Node { abstract byte execute(byte input); @Specialization byte doDefault(byte input, @Cached InlinedByteValueProfile profile) { byte profiledValue = profile.profile(this, input); // compiler may now see profiledValue as a partial evaluation constant return profiledValue; } }
Modifier and Type | Field and Description |
---|---|
protected static int |
GENERIC |
protected static int |
REQUIRED_STATE_BITS |
protected static int |
SPECIALIZED |
protected InlineSupport.StateField |
state |
protected static int |
UNINITIALIZED |
Modifier and Type | Method and Description |
---|---|
void |
disable(Node node)
Disables this profile by setting it to its generic state.
|
static InlinedByteValueProfile |
getUncached()
Returns the uncached version of the profile.
|
static InlinedByteValueProfile |
inline(InlineSupport.InlineTarget target)
Returns an inlined version of the profile.
|
byte |
profile(Node node,
byte value) |
void |
reset(Node node)
Resets this profile to its uninitialized state.
|
String |
toString(Node node)
Prints a string representation of this inlined profile given a target node.
|
toString
protected static final int UNINITIALIZED
protected static final int SPECIALIZED
protected static final int GENERIC
protected static final int REQUIRED_STATE_BITS
protected final InlineSupport.StateField state
public byte profile(Node node, byte value)
public String toString(Node node)
toString
in class InlinedProfile
public static InlinedByteValueProfile inline(InlineSupport.InlineTarget target)
public static InlinedByteValueProfile getUncached()
public final void disable(Node node)
InlinedProfile
deoptimize
on any
invocation of a profile method.
This method must not be called on compiled code paths. Note that disabling the profile will not invalidate existing compiled code that uses this profile.
disable
in class InlinedProfile
public final void reset(Node node)
InlinedProfile
This method must not be called on compiled code paths. Note that disabling the profile will not invalidate existing compiled code that uses this profile.
reset
in class InlinedProfile