-
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] GetMethodDescData for jitted methods #109187
Conversation
also move method flags out of the RuntimeTypeSystem_1 contract for the cases where the method validation needs to call back to type validation, go via the contract
...managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Legacy/ICorProfiler.cs
Outdated
Show resolved
Hide resolved
it's an implementation detail
Co-authored-by: Aaron Robinson <[email protected]>
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.
I've read through this and it seems like you've made good progress towards our goal here. I've a few comments about formatting + a few more general comments.
- I see a lot of code dedicated to
MethodDesc
validation. Is that really necessary, and does the behavior match our existing DAC? We may run this in an environment where the full heap isn't available, and we might want code to do a best effort job of producing results. Also, are there changes to theMethodDesc
validation logic here, or just refactoring to a new location? Is the validation logic documented in the data contract markdown? - I don't see documentation updates in the markdown yet. I see that some existing contracts look to have their implementation modified, but I don't see the corresponding documentation updates.
- Would it be possible to build a bulleted list of the TODO items that are not assertions that are needed to make this contract work completely?
...acreader/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/RuntimeTypeSystem_1.cs
Outdated
Show resolved
Hide resolved
...rosoft.Diagnostics.DataContractReader.Contracts/RuntimeTypeSystemHelpers/MethodValidation.cs
Outdated
Show resolved
Hide resolved
yes
I tried to make it match the existing DAC. Is it necessary? I'm not sure. We do need some validation - I have discovered that the
Understood
There is additional validation here. The version checked in previously was an incomplete snapshot (basically just establishing the internal API for validation).
No. Is it part of the contract? I've been thinking of it as an artifact of the reader |
I don't know. It's certainly something that the implementation of the contract depends on to some extent, so all of the dependencies of it (such as the fields it accesses, etc) should probably be in the contract, but the actual validation logic is a more interesting question. I would leave it out of the contract spec for now, so I wouldn't worry about it this week, but given that SOS actually depends on this logic doing something useful for correct functioning, its implied that something is required to make our diagnostic stack work. I would file a bug that you didn't write contract docs for this and leave it at that. |
we just use GetTypeHandle now
I updated the RuntimeTypeSystem contract markdown with the new code and fixed up other contracts to match the implementations as necessary Created issues: |
the "additional pointers" logic in RuntimeTypeSystem_1 depends on the sizes
This is enough for
!PrintException
without R2R methods on the stackThere's also a
ReJIT
contract here which just checks whether rejit is enabled.Most of the complexity is in validating MethodDescs
Contributes to #99302
Contributes to #108553