Repository navigation
JIT: turn MEASURE_NOWAY off by default - #132625
Merged
Merged
Conversation
MEASURE_NOWAY was enabled in every DEBUG build, expanding every noway_assert to an unconditional out-of-line RecordNowayAssertGlobal call that immediately returns because JitMeasureNowayAssert defaults to 0. Require it to be defined to 1 manually when measuring instead. Checked JIT instructions retired: benchmarks.run -3.75% benchmarks.run_pgo -3.65% benchmarks.run_pgo_optrepeat -3.75% libraries.pmi -3.63% benchmarks.run replay wall clock: 67.38s -> 65.59s (-2.66%). Co-authored-by: Copilot <[email protected]> Copilot-Session: 064035bf-fb1f-450e-afd2-08a7700aa736
|
Azure Pipelines: Successfully started running 5 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR changes the JIT’s MEASURE_NOWAY feature so it is disabled by default even in DEBUG builds, avoiding unconditional RecordNowayAssertGlobal instrumentation in every noway_assert expansion unless explicitly enabled for measurement scenarios.
Changes:
- Update
MEASURE_NOWAYto default to0unless explicitly defined, including in DEBUG builds. - Clarify
JitMeasureNowayAssert/JitMeasureNowayAssertFileconfig comments to reflect that measurement requiresMEASURE_NOWAYto be defined to1.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/coreclr/jit/jitconfigvalues.h | Updates config documentation to clarify MEASURE_NOWAY must be defined to 1 for noway-assert measurement options. |
| src/coreclr/jit/error.h | Changes MEASURE_NOWAY defaulting behavior so it is off by default (including DEBUG), reducing noway_assert expansion bloat unless explicitly enabled. |
Co-authored-by: Copilot <[email protected]> Copilot-Session: 064035bf-fb1f-450e-afd2-08a7700aa736
Member
Author
|
PTAL @dotnet/jit-contrib |
EgorBo
approved these changes
Aug 21, 2026
Member
Author
|
/ba-g Build analysis is blocking because of dotnet/arcade#17340 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MEASURE_NOWAY was enabled in every DEBUG build, expanding every noway_assert to an unconditional out-of-line RecordNowayAssertGlobal call that immediately returns because JitMeasureNowayAssert defaults to 0. Require it to be defined to 1 manually when measuring instead.
Checked JIT instructions retired:
benchmarks.run -3.75%
benchmarks.run_pgo -3.65%
benchmarks.run_pgo_optrepeat -3.75%
libraries.pmi -3.63%
benchmarks.run replay wall clock: 67.38s -> 65.59s (-2.66%).