Skip to content

Add clrjit.natvis file #52668

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

Merged
merged 7 commits into from
May 14, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/coreclr/jit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ if(CLR_CMAKE_TARGET_WIN32)
endif(CLR_CMAKE_TARGET_WIN32)

set( JIT_SOURCES
clrjit.natvis
alloc.cpp
assertionprop.cpp
bitset.cpp
Expand Down
105 changes: 105 additions & 0 deletions src/coreclr/jit/clrjit.natvis
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<?xml version="1.0" encoding="utf-8"?>

<!--
Licensed to the .NET Foundation under one or more agreements.
The .NET Foundation licenses this file to you under the MIT license.
-->


<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">

<Type Name="Compiler">
<DisplayString>{{ {info.compFullName,sb} ({info.compMethodHashPrivate,x})}}</DisplayString>
<StringView>info.compFullName,sb</StringView>
</Type>

<Type Name="BasicBlock">
<DisplayString Condition="bbJumpKind==BBJ_COND || bbJumpKind==BBJ_ALWAYS || bbJumpKind==BBJ_LEAVE || bbJumpKind==BBJ_EHCATCHRET || bbJumpKind==BBJ_CALLFINALLY">BB{bbNum,d}->BB{bbJumpDest->bbNum,d}; {bbJumpKind,en}</DisplayString>
<DisplayString>BB{bbNum,d};--- {bbJumpKind}</DisplayString>
</Type>

<Type Name="EHblkDsc">
<DisplayString>type={ebdHandlerType}</DisplayString>
</Type>

<!-- GenTree -->
<Type Name="GenTree">
<DisplayString>{{{gtOper,en}, {gtType,en}}}}</DisplayString>
</Type>
<Type Name="GenTreeIntCon">
<DisplayString>{{IntCon= {((GenTreeIntCon*)this)-&gt;gtIconVal, d}}}</DisplayString>
</Type>
<Type Name="GenTreeDblCon">
<DisplayString>{{DblCon= {((GenTreeDblCon*)this)-&gt;gtDconVal, g}}}</DisplayString>
</Type>
<Type Name="GenTreeStrCon">
<DisplayString>CNS_STR</DisplayString>
</Type>
<Type Name="GenTreeLngCon">
<DisplayString>{{LngCon= {((GenTreeLngCon*)this)-&gt;gtLconVal, l}}}</DisplayString>
</Type>
<Type Name="GenTreeOp">
<DisplayString Condition="this->gtOper==GT_ASG">{{{((GenTreeUnOp*)this)-&gt;gtOper,en}={this-&gt;gtOp2,na}}}</DisplayString>
<DisplayString Condition="this->gtOper==GT_CAST">{{{((GenTreeCast*)this)-&gt;gtCastType,en} &lt;- {((GenTreeUnOp*)this)-&gt;gtOp1-&gt;gtType,en}}}</DisplayString>
</Type>

<Type Name="LclVarDsc">
<DisplayString>{{ {lvType,en} - {lvReason,s} }}</DisplayString>
</Type>

<Type Name="GenTreeLclVar" Inheritable="false">
<DisplayString>{{{gtType,en} V{((GenTreeLclVar*)this)-&gt;_gtLclNum, 02u}}}</DisplayString>
</Type>

<!-- Register allocation -->
<Type Name="RefPosition">
<DisplayString>{{#{rpNum,d} - {refType,en}}}</DisplayString>
<Expand>
<Item Name="Referent" Condition="this->isPhysRegRef">(RegRecord*)this-&gt;referent</Item>
<Item Name="Referent" Condition="!this->isPhysRegRef">(Interval*)this-&gt;referent</Item>
<CustomListItems>
<Variable Name="reg" InitialValue="this->registerAssignment" />
<Variable Name="regIndex" InitialValue="0" />
<Loop Condition="reg != 0">
<Item Condition="(reg &amp; 1) != 0">((regNumber)regIndex),en</Item>
<Exec>regIndex++</Exec>
<Exec>reg = reg >> 1</Exec>
</Loop>
</CustomListItems>
</Expand>
</Type>

<Type Name="Interval">
<DisplayString Condition="this->isLocalVar">[V{this->varNum,d}, #{this->intervalIndex, d}, reg= {(regNumber)physReg, en}]</DisplayString>
<DisplayString Condition="this->isConstant">[C{this->intervalIndex, d}, reg= {(regNumber)physReg, en}]</DisplayString>
<DisplayString>[I{this->intervalIndex, d}, reg= {(regNumber)physReg, en}]</DisplayString>
</Type>

<Type Name="RegRecord">
<DisplayString>[reg= {((regNumber)regNum),en}, type= {registerType, en}]</DisplayString>
<Expand>
<Item Name="[Assigned]">assignedInterval</Item>
<Item Name="[Previous]">previousInterval</Item>
</Expand>
</Type>

<!-- Emitter -->
<Type Name="insGroup">
<DisplayString>IG{igNum,d}}</DisplayString>
</Type>

<!-- utils -->
<Type Name="jitstd::list&lt;*&gt;">
<DisplayString Condition="m_nSize > 0">Size = {m_nSize}</DisplayString>
<DisplayString Condition="m_nSize == 0">Empty</DisplayString>
<Expand>
<LinkedListItems>
<Size>m_nSize</Size>
<HeadPointer>this->m_pHead</HeadPointer>
<NextPointer>this-&gt;m_pNext</NextPointer>
<ValueNode>this-&gt;m_value</ValueNode>
</LinkedListItems>
</Expand>
</Type>

</AutoVisualizer>