Replace SHash of call counting managers with linked list.#126729
Open
rcj1 wants to merge 1 commit intodotnet:mainfrom
Open
Replace SHash of call counting managers with linked list.#126729rcj1 wants to merge 1 commit intodotnet:mainfrom
rcj1 wants to merge 1 commit intodotnet:mainfrom
Conversation
Contributor
|
Tagging subscribers to this area: @agocke |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR simplifies call counting manager tracking in CoreCLR by replacing an SHash that was only used for add/remove/iterate with a lightweight linked-list, and adjusts startup initialization accordingly.
Changes:
- Replace the global
SHashofCallCountingManagerinstances with an intrusive linked list (O(1) add/remove, simple iteration). - Remove
CallCountingManager::StaticInitialize()and callCallCountingStub::StaticInitialize()directly during EE startup. - Update all iterations over managers to traverse the linked list.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/coreclr/vm/ceemain.cpp | Switch tiered compilation startup init from CallCountingManager::StaticInitialize() to CallCountingStub::StaticInitialize(). |
| src/coreclr/vm/callcounting.h | Remove manager SHash traits/storage; add linked-list fields and update static storage type. |
| src/coreclr/vm/callcounting.cpp | Implement linked-list insertion/removal and update all manager iteration sites; delete unused hash-traits and static init. |
davidwrighton
approved these changes
Apr 9, 2026
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.
We only add, remove, and iterate through all here - we never make use of the hashing behavior. So, it is more appropriate to have this as a linked list as opposed to an SHash.