oracle/graal · error · IllegalStateException
No inlining policy provider with provided name:
Error message
No inlining policy provider with provided name:
What it means
IllegalStateException from AgnosticInliningPhase.getInliningPolicyProvider: the string configured in TruffleCompilerOptions.FirstTierInliningPolicy (first tier) or TruffleCompilerOptions.InliningPolicy (other tiers) does not match the getName() of any registered InliningPolicyProvider in POLICY_PROVIDERS. Only an empty string selects the default provider; any other unrecognized name is a configuration error, not a fallback situation.
Source
Thrown at compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/truffle/phases/inlining/AgnosticInliningPhase.java:71
private final PostPartialEvaluationSuite postPartialEvaluationSuite;
public AgnosticInliningPhase(PostPartialEvaluationSuite postPartialEvaluationSuite) {
this.postPartialEvaluationSuite = postPartialEvaluationSuite;
}
private static InliningPolicyProvider getInliningPolicyProvider(TruffleTierContext context) {
boolean firstTier = context.isFirstTier();
final String policy = (firstTier ? TruffleCompilerOptions.FirstTierInliningPolicy : TruffleCompilerOptions.InliningPolicy).getValue(context.compilerOptions);
if (Objects.equals(policy, "")) {
return POLICY_PROVIDERS.get(firstTier ? POLICY_PROVIDERS.size() - 1 : 0);
} else {
for (InliningPolicyProvider provider : POLICY_PROVIDERS) {
if (provider.getName().equals(policy)) {
return provider;
}
}
throw new IllegalStateException("No inlining policy provider with provided name: " + policy);
}
}
@Override
protected void run(StructuredGraph graph, TruffleTierContext context) {
final InliningPolicy policy = getInliningPolicyProvider(context).get(context.compilerOptions, context);
final CallTree tree = new CallTree(postPartialEvaluationSuite, context, policy);
TruffleInliningScope scope = TruffleInliningScope.getCurrent(context.debug);
if (scope != null) {
scope.setCallTree(tree);
}
tree.dumpBasic("Before Inline");
if (TruffleCompilerOptions.Inlining.getValue(context.compilerOptions)) {
policy.run(tree);
tree.dumpBasic("After Inline");
tree.collectTargetsToDequeue(context.task);
tree.updateTracingInfo(context.task);
}View on GitHub (pinned to a66e9ccd1d)
Solutions
- List valid provider names: inspect POLICY_PROVIDERS registrations in the truffle inlining package (subclasses of InliningPolicyProvider) or check the TruffleCompilerOptions javadoc for InliningPolicy/FirstTierInliningPolicy.
- Correct or remove the option: unset it (or set to empty string) to use the default provider (first-tier default is the last entry, otherwise the first).
- If you vendor a custom provider, verify it is registered in POLICY_PROVIDERS and its getName() exactly matches the option value.
- After upgrading GraalVM, re-check that the policy name still exists.
Example fix
# before -Dgraal.InliningPolicy=agresive # typo # after -Dgraal.InliningPolicy= # empty = default provider # or the exact registered name, e.g. -Dgraal.InliningPolicy=truffle-aggressive
Defensive patterns
Strategy: validation
Validate before calling
// Validate the option against registered providers before compiling
String p = TruffleCompilerOptions.InliningPolicy.getValue(options);
boolean known = POLICY_PROVIDERS.stream().anyMatch(pr -> pr.getName().equals(p));
if (!p.isEmpty() && !known) {
throw new ConfigException("Unknown InliningPolicy '" + p + "'; valid: " +
POLICY_PROVIDERS.stream().map(InliningPolicyProvider::getName).toList());
} Prevention
- Centralize option names in constants or a config schema instead of free-form strings in scripts.
- After any GraalVM upgrade, grep the release notes for renamed inlining policy providers.
- Prefer leaving InliningPolicy unset (empty string selects the default provider) unless you specifically need another policy.
When it happens
Trigger: Setting -Dgraal.FirstTierInliningPolicy=foo or -Dgraal.InliningPolicy=foo where 'foo' is not a registered provider name (typo, casing mismatch, or a provider removed/renamed between GraalVM versions), then compiling anything that runs AgnosticInliningPhase.
Common situations: Typos in policy names in launch scripts or .graalvm-options files; upgrading GraalVM where a policy provider was renamed or deleted; copy-pasting an option from a different compiler distribution (e.g. an LLVM-era name) into a Truffle setup.
Related errors
- Early inlining exceeded the maximum depth of %s for method %
- You can't resume an already executing continuation.
- This continuation has already completed successfully.
- This continuation has failed and must be discarded.
- You can't resume a continuation while it is being serialized
AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14).
Data as JSON: /api/errors/999b0774b4fe0b8f.
Report an issue: GitHub.