-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add debug information for runtime async methods #120303
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
base: main
Are you sure you want to change the base?
Changes from all commits
b7bb968
d5d0864
d7277fb
6addd0e
6a5bf19
262260a
4e2a829
820afa9
3621eae
f597424
6bb6cee
f580e3f
55b9522
c9c64be
db77446
c808390
3ec5160
bb12c77
bf3364b
b49f38f
d1bf49f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -431,4 +431,31 @@ class ICorDebugInfo | |
// Source information about the IL instruction in the inlinee | ||
SourceTypes Source; | ||
}; | ||
|
||
struct AsyncContinuationVarInfo | ||
{ | ||
// IL number of variable (or one of the special IL numbers, like TYPECTXT_ILNUM) | ||
uint32_t VarNumber; | ||
// Offset in continuation's data where this variable is stored | ||
uint32_t Offset; | ||
Comment on lines
+439
to
+440
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We probably need to include There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Storing variables in arrays may work well for some scenarios, like AOT, which is sensitive to generation of types or GC layouts. I think Just in case we may end up using more than one shape, perhaps add some versioning/flavor marker in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For some values we have data stored in both
I expect we stabilize on something during .NET 11, so if we change it after I think we can take an R2R version update at the same time as well. If we do it like that we can version based on R2R module version (it's already what we do in |
||
}; | ||
|
||
struct AsyncSuspensionPoint | ||
{ | ||
// IL offset in the root method that resulted in the creation of this suspension point. | ||
uint32_t RootILOffset; | ||
// Index of inline tree node containing the IL offset (0 for root) | ||
uint32_t Inlinee; | ||
// IL offset that resulted in the creation of the suspension point. | ||
uint32_t ILOffset; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if we care about size, can IL offsets inside a method be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think there is a 2^16 size limit on IL, but in any case we do not care about size in these data types. The actual storage of these is compressed in the VM, so when these values are small, they consume little space. |
||
// Count of AsyncContinuationVarInfo in array of locals starting where | ||
// the previous suspension point's locals end. | ||
uint32_t NumContinuationVars; | ||
noahfalk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}; | ||
|
||
struct AsyncInfo | ||
{ | ||
// Number of suspension points in the method. | ||
uint32_t NumSuspensionPoints; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can this be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same reason as above I don't think we need to limit this. |
||
}; | ||
}; |
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.
Updating these tools based on @EgorBo's instructions (I used the prompt to add the JIT-EE boilerplate, but the agent was not making the changes automatically without allowing it access to these tools)