clrjit.natvis 8.5 KB
Newer Older
K
Kunal Pathak 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
<?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,en}</DisplayString>
  </Type>

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

  <!-- GenTree -->
  <Type Name="GenTree">
B
Bruce Forstall 已提交
27
    <DisplayString>[{gtOper,en}, {gtType,en}]</DisplayString>
K
Kunal Pathak 已提交
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
  </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">[{this-&gt;gtOp1,na}={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>
44 45
    <DisplayString Condition="this->gtOper==GT_SIMD">[{((GenTreeSIMD*)this)-&gt;gtSIMDIntrinsicID,en}, {gtType,en}]</DisplayString>
    <DisplayString Condition="this->gtOper==GT_HWINTRINSIC">[{((GenTreeHWIntrinsic*)this)-&gt;gtHWIntrinsicId,en}, {gtType,en}]</DisplayString>
K
Kunal Pathak 已提交
46 47 48 49 50 51 52 53 54 55 56 57
    <DisplayString>[{gtOper,en}, {gtType,en}]</DisplayString>
  </Type>

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

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

B
Bruce Forstall 已提交
58 59 60 61
  <Type Name="GenTreeLclFld" Inheritable="false">
    <DisplayString>[{gtOper,en}, {gtType,en} V{((GenTreeLclFld*)this)-&gt;_gtLclNum,u}[+{((GenTreeLclFld*)this)-&gt;m_lclOffs,u}]]</DisplayString>
  </Type>

K
Kunal Pathak 已提交
62 63 64 65
  <!-- Register allocation -->
  <Type Name="LinearScan">
    <DisplayString>LinearScan</DisplayString>
    <Expand>
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
        <Item Name="inVarToRegMaps">"InVarToRegMaps"</Item>
        <CustomListItems>
          <Variable Name="block" InitialValue="this-&gt;compiler-&gt;fgFirstBB" />
          <Variable Name="bbLiveInMap" InitialValue="block ? block->bbLiveIn[0] : 0" />
          <Variable Name="inVarMap" InitialValue="block ? this->inVarToRegMaps[block->bbNum] : 0" />
          <Variable Name="varIndex" InitialValue="0" />
          <Loop Condition="block">
              <Item Name="---BB{block->bbNum,2u}---">block->bbNum,2u</Item>
              <Exec>varIndex = 0</Exec>
              <Exec>inVarMap = this->inVarToRegMaps[block->bbNum]</Exec>
              <Exec>bbLiveInMap = block->bbLiveIn[0]</Exec>
              <Loop Condition="bbLiveInMap != 0">
                <Item Name="V{this->localVarIntervals[varIndex]->varNum,2u}" Condition="(bbLiveInMap &amp; 1) != 0">((regNumber)inVarMap[varIndex]),en</Item>
                <Exec>varIndex++</Exec>
                <Exec>bbLiveInMap = bbLiveInMap >> 1</Exec>
              </Loop>
            <Exec>block = block->bbNext</Exec>
          </Loop>
        </CustomListItems>
        <Item Name="outVarToRegMaps">"OutVarToRegMaps"</Item>
        <CustomListItems>
          <Variable Name="block" InitialValue="this-&gt;compiler-&gt;fgFirstBB" />
          <Variable Name="bbLiveInMap" InitialValue="block ? block->bbLiveIn[0] : 0" />
          <Variable Name="outVarMap" InitialValue="block ? this->outVarToRegMaps[block->bbNum] : 0" />
          <Variable Name="varIndex" InitialValue="0" />
          <Loop Condition="block">
              <Item Name="---BB{block->bbNum,2u}---">block->bbNum,2u</Item>
              <Exec>varIndex = 0</Exec>
              <Exec>outVarMap = this->outVarToRegMaps[block->bbNum]</Exec>
              <Exec>bbLiveInMap = block->bbLiveIn[0]</Exec>
              <Loop Condition="bbLiveInMap != 0">
                <Item Name="V{this->localVarIntervals[varIndex]->varNum,2u}" Condition="(bbLiveInMap &amp; 1) != 0">((regNumber)outVarMap[varIndex]),en</Item>
                <Exec>varIndex++</Exec>
                <Exec>bbLiveInMap = bbLiveInMap >> 1</Exec>
              </Loop>
            <Exec>block = block->bbNext</Exec>
          </Loop>
        </CustomListItems>
K
Kunal Pathak 已提交
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
        <Item Name="AvailableRegs mask">this-&gt;m_AvailableRegs</Item>
        <CustomListItems>
          <Variable Name="reg" InitialValue="this->m_AvailableRegs" />
          <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>
        <Item Name="RegistersWithConstants mask">this-&gt;m_RegistersWithConstants</Item>
        <CustomListItems>
          <Variable Name="reg" InitialValue="this->m_RegistersWithConstants" />
          <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="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 Condition="igFlags &amp; 0x200">IG{igNum,d} [extend]</DisplayString>
    <DisplayString>IG{igNum,d}</DisplayString>
  </Type>

164 165 166 167 168 169 170 171
  <Type Name="emitter::instrDesc">
    <DisplayString Condition="(_idInsFmt == IF_RRD) || (_idInsFmt == IF_RWR) || (_idInsFmt == IF_RRW)">{_idIns,en} {_idReg1,en}</DisplayString>
    <DisplayString Condition="(_idInsFmt == IF_RRD_CNS) || (_idInsFmt == IF_RWR_CNS) || (_idInsFmt == IF_RRW_CNS)">{_idIns,en} {_idReg1,en}, {_idLargeCns,d}</DisplayString>
    <DisplayString Condition="(_idInsFmt == IF_RRW_SHF) &amp;&amp; (_idLargeCns != 0)">{_idIns,en} {_idReg1,en}, {_idLargeCns,d}</DisplayString>
    <DisplayString Condition="(_idInsFmt == IF_RRW_SHF) &amp;&amp; (_idLargeCns == 0)">{_idIns,en} {_idReg1,en}, {_idSmallCns,d}</DisplayString>
    <DisplayString>{_idIns,en}</DisplayString>
  </Type>

K
Kunal Pathak 已提交
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186
  <!-- 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>