public final class InlinedBranchProfile extends InlinedProfile
InlinedBranchProfile.enter(Node)
method is invoked first the optimized code is invalidated and the branch
where InlinedBranchProfile.enter(Node)
is invoked is enabled for compilation. Otherwise if the
InlinedBranchProfile.enter(Node)
method was never invoked the branch will not get compiled.
Usage example:
class ExampleNode extends Node { abstract int execute(int value); @Specialization int doDefault(int value, @Cached InlinedBranchProfile errorProfile) { if (value == Integer.MAX_VALUE) { errorProfile.enter(this); throw new Error("Invalid input value"); } return value; } }
InlinedProfile
Modifier and Type | Method and Description |
---|---|
void |
disable(Node node)
Disables this profile by setting it to its generic state.
|
void |
enter(Node node) |
static InlinedBranchProfile |
getUncached()
Returns the uncached version of the profile.
|
static InlinedBranchProfile |
inline(InlineSupport.InlineTarget target)
Returns an inlined version of the profile.
|
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.
|
boolean |
wasEntered(Node node)
|
toString
public void enter(Node node)
public boolean wasEntered(Node node)
true
if the InlinedBranchProfile.enter(Node)
method was ever called, otherwise
false
. For profiles with profiling disabled or uncached
profiles this method always returns true
.public void reset(Node node)
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
public void disable(Node node)
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 String toString(Node node)
toString
in class InlinedProfile
public static InlinedBranchProfile inline(InlineSupport.InlineTarget target)
public static InlinedBranchProfile getUncached()