{"record":{"id":"b5957df24715acf7","repo":"dotnet/runtime","slug":"pass-only-one-tiering-option","errorCode":null,"errorMessage":"Pass only one tiering option.","messagePattern":"Pass only one tiering option\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/coreclr/scripts/superpmi.py","lineNumber":726,"sourceCode":"            self.corerun = os.path.join(self.core_root, self.corerun_tool_name)\n\n        if coreclr_args.crossgen2:\n            self.corerun = os.path.join(self.core_root, self.corerun_tool_name)\n\n        if coreclr_args.pmi or coreclr_args.crossgen2:\n            self.assemblies = coreclr_args.assemblies\n            self.exclude = coreclr_args.exclude\n            if coreclr_args.tiered_compilation or coreclr_args.tiered_pgo:\n               raise RuntimeError(\"Tiering options have no effect for pmi or crossgen2 collections.\")\n\n        if coreclr_args.nativeaot:\n            self.ilc_rsps = coreclr_args.ilc_rsps\n            self.exclude = coreclr_args.exclude\n            if coreclr_args.tiered_compilation or coreclr_args.tiered_pgo:\n                raise RuntimeError(\"Tiering options have no effect for nativeaot collections.\")\n\n        if coreclr_args.tiered_compilation and coreclr_args.tiered_pgo:\n            raise RuntimeError(\"Pass only one tiering option.\")\n\n        self.coreclr_args = coreclr_args\n\n        self.temp_location = None\n\n        # Pathname for a temporary .MCL file used for noticing SuperPMI replay failures against base MCH.\n        self.base_fail_mcl_file = None\n\n        # The base .MCH file path\n        self.base_mch_file = None\n\n        # Final .MCH file path\n        if self.coreclr_args.output_mch_path is not None:\n            self.final_mch_file = os.path.abspath(self.coreclr_args.output_mch_path)\n            final_mch_dir = os.path.dirname(self.final_mch_file)\n            if not os.path.isdir(final_mch_dir):\n                os.makedirs(final_mch_dir)\n        else:","sourceCodeStart":708,"sourceCodeEnd":744,"githubUrl":"https://github.com/dotnet/runtime/blob/60108ba66eb7d1d12f595480091b4ad80a24b172/src/coreclr/scripts/superpmi.py#L708-L744","documentation":"Raised by SuperPMICollect.__init__ in superpmi.py when both --tiered_compilation and --tiered_pgo are passed. tiered_pgo already implies tiered compilation (it sets both DOTNET_TieredCompilation=1 and DOTNET_TieredPGO=1), so specifying both is ambiguous and rejected.","triggerScenarios":"Invoking `superpmi.py collect ... --tiered_compilation --tiered_pgo` (via command-based collection, since pmi/crossgen2/nativeaot raise their own errors first).","commonSituations":"Enabling all tiering knobs 'just in case'; not realizing --tiered_pgo is a superset of --tiered_compilation.","solutions":["Use --tiered_pgo alone (it enables tiered compilation + PGO).","Or use --tiered_compilation alone if you do not want PGO."],"exampleFix":"// before\npython superpmi.py collect 'cmd' --tiered_compilation --tiered_pgo   # 'Pass only one tiering option.'\n// after\npython superpmi.py collect 'cmd' --tiered_pgo","handlingStrategy":"validation","validationCode":"if args.tiered_compilation and args.tiered_pgo:\n    raise SystemExit(\"Pass only one of --tiered_compilation or --tiered_pgo (tiered_pgo implies tiered compilation)\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Prefer --tiered_pgo when you want PGO (it enables tiering too).","Document the implication in wrapper scripts to prevent both being passed."],"tags":["superpmi","collect","tiered-compilation","argument-validation","python"],"backgroundTag":null,"analyzedSha":"60108ba66eb7d1d12f595480091b4ad80a24b172","analyzedAt":"2026-08-10T18:54:11.478Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}