dotnet/runtime · error · RuntimeError
Tiering options have no effect for pmi or crossgen2 collecti
Error message
Tiering options have no effect for pmi or crossgen2 collections.
What it means
Thrown by SuperPMICollect.__init__() when the user requests a PMI or crossgen2 collection mode (--pmi or --crossgen2) and simultaneously passes --tiered_compilation or --tiered_pgo. Tiered compilation and tiered PGO are runtime JIT behaviors that only apply when the JIT is invoked through the normal runtime path; PMI and crossgen2 invoke the JIT directly at compile time (AOT-style), making tiering options meaningless and potentially misleading.
Source
Thrown at src/coreclr/scripts/superpmi.py:717
self.superpmi_path = determine_superpmi_tool_path(coreclr_args)
self.mcs_path = determine_mcs_tool_path(coreclr_args)
self.collection_command = coreclr_args.collection_command
self.collection_args = coreclr_args.collection_args
if coreclr_args.pmi:
self.pmi_location = determine_pmi_location(coreclr_args)
self.corerun = os.path.join(self.core_root, self.corerun_tool_name)
if coreclr_args.crossgen2:
self.corerun = os.path.join(self.core_root, self.corerun_tool_name)
if coreclr_args.pmi or coreclr_args.crossgen2:
self.assemblies = coreclr_args.assemblies
self.exclude = coreclr_args.exclude
if coreclr_args.tiered_compilation or coreclr_args.tiered_pgo:
raise RuntimeError("Tiering options have no effect for pmi or crossgen2 collections.")
if coreclr_args.nativeaot:
self.ilc_rsps = coreclr_args.ilc_rsps
self.exclude = coreclr_args.exclude
if coreclr_args.tiered_compilation or coreclr_args.tiered_pgo:
raise RuntimeError("Tiering options have no effect for nativeaot collections.")
if coreclr_args.tiered_compilation and coreclr_args.tiered_pgo:
raise RuntimeError("Pass only one tiering option.")
self.coreclr_args = coreclr_args
self.temp_location = None
# Pathname for a temporary .MCL file used for noticing SuperPMI replay failures against base MCH.
self.base_fail_mcl_file = None
# The base .MCH file pathView on GitHub (pinned to 290d5ab72c)
Solutions
- Remove --tiered_compilation and --tiered_pgo flags when using --pmi or --crossgen2 with superpmi.py collect.
- If you need tiered compilation data, use the default collection mode (a collection command) instead of --pmi or --crossgen2.
- Understand that PMI and crossgen2 produce deterministic single-tier output; tiering cannot be applied to these collection types.
Example fix
# before: incompatible flags python superpmi.py collect --pmi -assemblies ./libs --tiered_pgo # after: remove tiering flags for pmi/crossgen2 python superpmi.py collect --pmi -assemblies ./libs
Defensive patterns
Strategy: validation
Validate before calling
# Validate argument compatibility before calling SuperPMICollect
if (coreclr_args.pmi or coreclr_args.crossgen2):
if coreclr_args.tiered_compilation or coreclr_args.tiered_pgo:
raise ValueError('Tiering options (--tiered_compilation, --tiered_pgo) are incompatible with --pmi or --crossgen2') Type guard
def is_valid_collection_mode_combo(pmi: bool, crossgen2: bool, tiered_compilation: bool, tiered_pgo: bool) -> bool:
if pmi or crossgen2:
return not (tiered_compilation or tiered_pgo)
return True Try / catch
try:
collector = SuperPMICollect(coreclr_args)
except RuntimeError as e:
if 'Tiering options have no effect for pmi or crossgen2' in str(e):
logging.error('Remove --tiered_compilation and --tiered_pgo when using --pmi or --crossgen2')
sys.exit(1)
raise Prevention
- Never combine --tiered_compilation or --tiered_pgo with --pmi or --crossgen2.
- Understand that PMI and crossgen2 produce deterministic single-tier JIT output.
- If tiering investigation is needed, use the default collection command mode, not --pmi.
When it happens
Trigger: At lines 713-717: if coreclr_args.pmi or coreclr_args.crossgen2, and (coreclr_args.tiered_compilation or coreclr_args.tiered_pgo), line 717 raises. The combination is explicitly rejected because tiering has no effect on PMI/crossgen2 compilation.
Common situations: A developer copies flags from a runtime benchmarking command and adds them to a SuperPMI collect command without realizing PMI and crossgen2 don't support tiering. Misunderstanding that SuperPMI PMI collections capture single-tier JIT output for deterministic replay, and tiering would introduce non-determinism.
Related errors
- Tiering options have no effect for nativeaot collections.
- Unsupported OS.
- Pass only one tiering option.
- PMI not found at {}
- Collection 'smoke_tests' is only available for 'nativeaot' c
AI-assisted analysis of dotnet/runtime@290d5ab72c (2026-08-06).
Data as JSON: /api/errors/f1359c493218d4de.
Report an issue: GitHub.