{"record":{"id":"999b0774b4fe0b8f","repo":"oracle/graal","slug":"no-inlining-policy-provider-with-provided-name","errorCode":null,"errorMessage":"No inlining policy provider with provided name: ","messagePattern":"No inlining policy provider with provided name: ","errorType":"validation","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/truffle/phases/inlining/AgnosticInliningPhase.java","lineNumber":71,"sourceCode":"\n    private final PostPartialEvaluationSuite postPartialEvaluationSuite;\n\n    public AgnosticInliningPhase(PostPartialEvaluationSuite postPartialEvaluationSuite) {\n        this.postPartialEvaluationSuite = postPartialEvaluationSuite;\n    }\n\n    private static InliningPolicyProvider getInliningPolicyProvider(TruffleTierContext context) {\n        boolean firstTier = context.isFirstTier();\n        final String policy = (firstTier ? TruffleCompilerOptions.FirstTierInliningPolicy : TruffleCompilerOptions.InliningPolicy).getValue(context.compilerOptions);\n        if (Objects.equals(policy, \"\")) {\n            return POLICY_PROVIDERS.get(firstTier ? POLICY_PROVIDERS.size() - 1 : 0);\n        } else {\n            for (InliningPolicyProvider provider : POLICY_PROVIDERS) {\n                if (provider.getName().equals(policy)) {\n                    return provider;\n                }\n            }\n            throw new IllegalStateException(\"No inlining policy provider with provided name: \" + policy);\n        }\n    }\n\n    @Override\n    protected void run(StructuredGraph graph, TruffleTierContext context) {\n        final InliningPolicy policy = getInliningPolicyProvider(context).get(context.compilerOptions, context);\n        final CallTree tree = new CallTree(postPartialEvaluationSuite, context, policy);\n        TruffleInliningScope scope = TruffleInliningScope.getCurrent(context.debug);\n        if (scope != null) {\n            scope.setCallTree(tree);\n        }\n        tree.dumpBasic(\"Before Inline\");\n        if (TruffleCompilerOptions.Inlining.getValue(context.compilerOptions)) {\n            policy.run(tree);\n            tree.dumpBasic(\"After Inline\");\n            tree.collectTargetsToDequeue(context.task);\n            tree.updateTracingInfo(context.task);\n        }","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/truffle/phases/inlining/AgnosticInliningPhase.java#L53-L89","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"# before\n-Dgraal.InliningPolicy=agresive   # typo\n\n# after\n-Dgraal.InliningPolicy=   # empty = default provider\n# or the exact registered name, e.g.\n-Dgraal.InliningPolicy=truffle-aggressive","handlingStrategy":"validation","validationCode":"// Validate the option against registered providers before compiling\nString p = TruffleCompilerOptions.InliningPolicy.getValue(options);\nboolean known = POLICY_PROVIDERS.stream().anyMatch(pr -> pr.getName().equals(p));\nif (!p.isEmpty() && !known) {\n    throw new ConfigException(\"Unknown InliningPolicy '\" + p + \"'; valid: \" +\n        POLICY_PROVIDERS.stream().map(InliningPolicyProvider::getName).toList());\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["truffle","inlining","configuration","illegal-state","graalvm"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}