-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Add some tests that validate debug info through ETW events #61962
Conversation
Validate the debug mappings generated by the JIT using the MethodILToNative event. Unfortunately we can not use EventListener as the event there does not contain the actual mappings (dotnet#12678) so this reuses some of the facilities from the tracing tests to use EventPipe and TraceEvent. This only adds the infrastructure and a small number of tests, but at least this should make it easier to add more tests in this area in the future. There are some more limitations, for example we cannot validate the CALL_INSTRUCTION mappings generated for the managed return value feature because the debugger filters them out of the table reported. I am hoping we can change these mappings to be included as normal in the future.
Tagging subscribers to this area: @tommcdon Issue DetailsValidate the debug mappings generated by the JIT using the This only adds the infrastructure and a small number of tests, but There are some more limitations, for example we cannot validate the
|
Tiering should not affect the minimum mappings we get, only DebuggableAttribute should. Also make sure we are testing optimized code instead of quickjitted non-debuggable code.
Since we test with TC on and off in innerloop we can allow it to test both flavors.
cc @dotnet/jit-contrib |
Tagging subscribers to this area: @JulieLeeMSFT Issue DetailsValidate the debug mappings generated by the JIT using the This only adds the infrastructure and a small number of tests, but There are some more limitations, for example we cannot validate the The tests themselves are added by adding a method to tests.il with an
|
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.
Very cool to add testing here!
My only suggestion would be that either at the top of tester.cs or perhaps as a separate README.md, write up a(n appropriately) detailed description of the methodology here, how to add tests, and what to do if a test fails (i.e., what kind of debugging should be done).
Forgot to reply, but I added a readme in the directory that explains the overall methodology and each file. |
Validate the debug mappings generated by the JIT using the
MethodILToNative event. Unfortunately we can not use EventListener as
the event there does not contain the actual mappings (#12678) so this
reuses some of the facilities from the tracing tests to use EventPipe
and TraceEvent (thanks for the help @noahfalk).
This only adds the infrastructure and a small number of tests, but
at least this should make it easier to add more tests in this area in
the future.
There are some more limitations, for example we cannot validate the
CALL_INSTRUCTION mappings generated for the managed return value feature
because the debugger filters them out of the table reported. I am hoping
we can change these mappings to be included as normal in the future.
The tests themselves are added by adding a method to tests.il with an
ExpectedILMappings
attribute that allows specifying a subset of IL offsets that we expect mappings to be generated for, with separate subsets under Debug and when optimizing. This was the best way I could think of to be able to refer to the right IL offsets.