[release/11.0] Use lock-free reads for ETW rundown versions - #133043
Merged
Conversation
The current ETW rundown code holds a `CodeVersionManager` lock across the full JIT method enumeration and ETW event emission. This can block JIT paths and delay code execution. This code change removes rundown-wide `CodeVersionManager` lock and instead relies on lock-free reads of published native-code version state. It builds on PR #[102298](#102298) and PR #[107152](#107152), which established published version state and lock-free read-only version lookups. It is noteworthy that a concurrent ReJIT or tiering update may cause rundown to skip over a newly inserted node or skip a record when code-address validation fails (if it is in the middle of an update). The benefit of a `CodeVersionManager` lock-free rundown likely outweighs guaranteeing a globally atomic rundown snapshot. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Copilot-Session: 08e6544d-6999-41a6-85b2-cbd9ea6fe071
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 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: @steveisok, @tommcdon, @dotnet/dotnet-diag |
steveisok
approved these changes
Sep 1, 2026
This was referenced Sep 2, 2026
Member
|
/ba-g Known helix job monitor issue. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Backport of #132757 to release/11.0
/cc @tommcdon
Customer Impact
Reported by an internal partner team. Applications with large numbers of JIT-compiled methods can spend several seconds performing ETW rundown while holding the global code-versioning lock. JIT paths that need the same lock can be delayed for the duration of rundown, blocking code execution.
Regression
No. This fixes longstanding lock contention in the ETW rundown implementation.
Testing
Risk