-
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 clrjit.natvis file #52668
Add clrjit.natvis file #52668
Conversation
@dotnet/jit-contrib |
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.
Looking good! A few suggestions
src/coreclr/jit/CMakeLists.txt
Outdated
) | ||
|
||
convert_to_absolute_path(JIT_NATVIS_SOURCE ${JIT_NATVIS_SOURCE}) | ||
add_linker_flag("/NATVIS:${JIT_NATVIS_SOURCE}") |
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.
All this natvis stuff is Windows-only
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.
Took a stab at it. @jkoritzinsky , let me know if there is anything that is not correct.
Co-authored-by: Jeremy Koritzinsky <[email protected]>
@@ -251,6 +251,10 @@ if (CLR_CMAKE_TARGET_WIN32) | |||
vartype.h | |||
) | |||
|
|||
# Append clrjit.natvis file | |||
list (APPEND JIT_SOURCES | |||
clrjit.natvis) |
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.
no, we still want it so ninja can rebuild when it changes.
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.
[#{rpNum,d} - {refType,en}]
Add
clrjit.natvis
file for better debugging experience. There are lot of things we can add to this file, but I just included the important ones that I could think of and time permitted. I have added some pattern likeLinkedList
orLoop
that someone else can refer and add entries to this file for the code they work on.I am also not 100% sure of what could be useful information to display for each type of
GenTree
node, but from what I have, it should be easy to extend.Here is the sample visualizer for
jitstd::list<RefPosition>
as well asRefPosition
and the decomposition ofregisterAssignment
inside it to show all the registers.Unfortunately, natvis do not support typedefs or primitive types, so it will be hard to use it more broadly.