Skip to content

Rename BBINSTR and BBOPT to PGO_INSTR and PGO_OPT - #138232

Merged
jkotas merged 2 commits into
dotnet:mainfrom
jkotas:jkotas-rename-bbinstr-pgo-instr
Nov 25, 2026
Merged

jkotas merged 2 commits into
dotnet:mainfrom
jkotas:jkotas-rename-bbinstr-pgo-instr

Conversation

@jkotas

@jkotas jkotas commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

BBINSTR and BBOPT are historical names for the profile-guided instrumentation and optimization flags.

Rename both flags and their uses across the JIT/EE interface, CoreCLR, AOT compilation, and SuperPMI diagnostics. Update the OSR design documentation to use PGO_INSTR. Flag values and runtime behavior remain unchanged; only the names and diagnostic text change.

Validation

  • .\build.cmd clr+libs+host - passed.
  • .\src\tests\build.cmd -Test JIT\PGO\InstrumentedTiers\InstrumentedTiers.csproj x64 Debug /p:LibrariesConfiguration=Debug - passed.
  • artifacts\tests\coreclr\windows.x64.Debug\JIT\PGO\InstrumentedTiers\InstrumentedTiers\InstrumentedTiers.cmd - passed.
  • python src\coreclr\scripts\jitformat.py -r . -o windows -a x64 - passed.

Note

This pull request description was generated with Copilot.

@github-actions github-actions Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Nov 24, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 6 pipeline(s).
9 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@jkotas
jkotas requested review from AndyAyersMS and a balanced review from Copilot November 24, 2026 23:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the instrumentation-flag rename.

No open issues 🎉

What changed in this PR

Renames the historical BBINSTR flags to PGO_INSTR to reflect their broader role in profile-guided optimization. The changes preserve flag values and instrumentation behavior while updating diagnostic names.

Changes:

  • Rename instrumentation flags consistently across the runtime, JIT, and managed JIT interface.
  • Update SuperPMI flag diagnostics and the JIT’s tier-switch diagnostic text.
  • Align OSR documentation with the new terminology.
File Description
src/​coreclr/​vm/​tieredcompilation.cpp Update flags selected for instrumented compilation tiers.
src/​coreclr/​tools/​superpmi/​superpmi-shared/​spmidumphelper.cpp Use new names in flag dumps.
src/​coreclr/​tools/​superpmi/​superpmi-shared/​methodcontext.cpp Update diagnostic flag strings.
src/​coreclr/​tools/​Common/​JitInterface/​CorInfoTypes.cs Rename managed flag definitions, preserving values.
src/​coreclr/​jit/​jitee.h Rename JIT flags and matching interface assertions.
src/​coreclr/​jit/​importercalls.cpp Update call-probe instrumentation checks.
src/​coreclr/​jit/​flowgraph.cpp Clear renamed flags when switching to optimized compilation.
src/​coreclr/​jit/​fgprofile.cpp Update the synthesized-profile instrumentation check.
src/​coreclr/​jit/​compiler.h Update the instrumentation status helper.
src/​coreclr/​jit/​compiler.cpp Update instrumentation checks, flag assignments, and diagnostic text.
src/​coreclr/​inc/​corjitflags.h Rename native interface flags, preserving values.
docs/​design/​features/​OsrDetailsAndDebugging.md Update flag terminology in OSR documentation.

Review effort: Balanced

@AndyAyersMS

Copy link
Copy Markdown
Member

Rename JIT_FLAG_BBOPT too?

@jkotas jkotas changed the title Rename BBINSTR flags to PGO_INSTR Rename BBINSTR and BBOPT to PGO_INSTR and PGO_OPT Nov 25, 2026
@jkotas

jkotas commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Rename JIT_FLAG_BBOPT too?

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants