-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cdac] Handle hot/cold map lookup in ExecutionManager.ReadyToRunJitManager.GetMethodInfo
#110087
Open
elinor-fung
wants to merge
13
commits into
dotnet:main
Choose a base branch
from
elinor-fung:cdac-methodDescData-r2r-hotcold
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[cdac] Handle hot/cold map lookup in ExecutionManager.ReadyToRunJitManager.GetMethodInfo
#110087
elinor-fung
wants to merge
13
commits into
dotnet:main
from
elinor-fung:cdac-methodDescData-r2r-hotcold
Conversation
This file contains 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
elinor-fung
requested review from
davidwrighton,
AaronRobinsonMSFT and
max-charlamb
November 22, 2024 16:43
dotnet-issue-labeler
bot
added
the
needs-area-label
An area label is needed to ensure this gets routed to the appropriate area owners
label
Nov 22, 2024
elinor-fung
added
area-Diagnostics-coreclr
and removed
needs-area-label
An area label is needed to ensure this gets routed to the appropriate area owners
labels
Nov 22, 2024
9 tasks
Tagging subscribers to this area: @tommcdon |
...ractReader.Contracts/Contracts/ExecutionManager/ExecutionManagerBase.ReadyToRunJitManager.cs
Show resolved
Hide resolved
...ractReader.Contracts/Contracts/ExecutionManager/ExecutionManagerBase.ReadyToRunJitManager.cs
Show resolved
Hide resolved
...Diagnostics.DataContractReader.Contracts/Contracts/ExecutionManager/Helpers/HotColdLookup.cs
Show resolved
Hide resolved
...Diagnostics.DataContractReader.Contracts/Contracts/ExecutionManager/Helpers/HotColdLookup.cs
Show resolved
Hide resolved
...Diagnostics.DataContractReader.Contracts/Contracts/ExecutionManager/Helpers/HotColdLookup.cs
Show resolved
Hide resolved
...Diagnostics.DataContractReader.Contracts/Contracts/ExecutionManager/Helpers/HotColdLookup.cs
Outdated
Show resolved
Hide resolved
...ics.DataContractReader.Contracts/Contracts/ExecutionManager/Helpers/RuntimeFunctionLookup.cs
Outdated
Show resolved
Hide resolved
...managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Data/ReadyToRunInfo.cs
Show resolved
Hide resolved
elinor-fung
commented
Nov 22, 2024
|
||
namespace Microsoft.Diagnostics.DataContractReader.ExecutionManagerHelpers; | ||
|
||
internal static class BinaryThenLinearSearch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If anyone has a better name...
AaronRobinsonMSFT
approved these changes
Nov 23, 2024
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.
Implement the hot/cold lookup logic for
ExecutionManager.ReadyToRunJitManager.GetMethodInfo
. Basic logic is now:Sub-bullets of 2 and 4 are the parts added by this change.
Add tests for
ExecutionManager
for getting code blocks and method desc in R2R with hot/cold splitting, runtime functions lookup functionality, and hot/cold map lookup logic.ExecutionManagerTests
just uses one specific runtime function / unwind info layoutRuntimeFunctionsTests
handle testing the matrix of different layoutsThe
RuntimeFunction
andUnwindInfo
structures are different depending on the platform. This matters for calculating the function length. To facilitate testing, I pulled out the runtime functions lookup into a helper class. This change puts reading the hot/cold map in a helper classHotColdLookup
. Having separate helpers (similarly, HashMapLookup and NibbleMap) should let us mock them out for testing if we want - there'd still be some work for how they are created (for example, tests need to be able to provide some instance instead of the contract directly creating the class), but it puts us in a reasonable position.Manually validated with
!ip2md
(temporarily commented out throwing not implemented for rejit ID requests) for an app published with R2R--hot-cold-splitting
that we correctly map addresses in cold/hot blocks to hot/cold parts, determine their start addresses and sizes, and return the correct method desc.Contributes to #99302, #109426