use of org.graalvm.compiler.truffle.runtime.TruffleCallBoundary in project graal by oracle.
the class HotSpotTruffleRuntime method setDontInlineCallBoundaryMethod.
/**
* Prevents C1 or C2 from inlining a call to a method annotated by {@link TruffleCallBoundary}
* so that we never miss the chance to switch from the Truffle interpreter to compiled code.
*
* @see HotSpotTruffleCompiler#installTruffleCallBoundaryMethods()
*/
public static void setDontInlineCallBoundaryMethod() {
MetaAccessProvider metaAccess = getMetaAccess();
ResolvedJavaType type = metaAccess.lookupJavaType(OptimizedCallTarget.class);
for (ResolvedJavaMethod method : type.getDeclaredMethods()) {
if (method.getAnnotation(TruffleCallBoundary.class) != null) {
setNotInlinableOrCompilable(method);
}
}
}
Aggregations