mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-23 06:44:35 +00:00
Add robin hood natvis.
https://gist.github.com/ikrima/1184c75b979cbfa655c0883c0d4ab068
This commit is contained in:
parent
4a1142fddf
commit
9bc3afabe7
@ -44,4 +44,67 @@
|
|||||||
<Type Name="tracy::Int48">
|
<Type Name="tracy::Int48">
|
||||||
<DisplayString>{{ value={int64_t( uint64_t(m_val[0]) | (uint64_t(m_val[1])<<8) | (uint64_t(m_val[2])<<16) | (uint64_t(m_val[3])<<24) | (uint64_t(m_val[4])<<32) | (uint64_t(m_val[5])<<40) )} }}</DisplayString>
|
<DisplayString>{{ value={int64_t( uint64_t(m_val[0]) | (uint64_t(m_val[1])<<8) | (uint64_t(m_val[2])<<16) | (uint64_t(m_val[3])<<24) | (uint64_t(m_val[4])<<32) | (uint64_t(m_val[5])<<40) )} }}</DisplayString>
|
||||||
</Type>
|
</Type>
|
||||||
|
<Type Name="tracy::detail::Table<*,*,*,*,*,*>">
|
||||||
|
<!--
|
||||||
|
$T1 = bool IsFlat
|
||||||
|
$T2 = size_t MaxLoadFactor100
|
||||||
|
$T3 = typename Key
|
||||||
|
$T4 = typename T
|
||||||
|
$T5 = typename Hash
|
||||||
|
$T6 = typename KeyEqual
|
||||||
|
-->
|
||||||
|
<!-- <DisplayString>{map}</DisplayString> -->
|
||||||
|
<Expand>
|
||||||
|
<Synthetic Name="[elements]">
|
||||||
|
<DisplayString>{{size={mNumElements}}}</DisplayString>
|
||||||
|
<Expand>
|
||||||
|
<CustomListItems MaxItemsPerView="5000" >
|
||||||
|
<Variable Name="itKeyVals" InitialValue="mKeyVals " />
|
||||||
|
<Variable Name="itInfo" InitialValue="mInfo " />
|
||||||
|
<Variable Name="itEndKeyVals" InitialValue="(void *)mInfo " />
|
||||||
|
<Variable Name="n" InitialValue="0ULL " />
|
||||||
|
<Variable Name="inc" InitialValue="(unsigned long)0" />
|
||||||
|
|
||||||
|
<Size>mNumElements</Size>
|
||||||
|
<Loop>
|
||||||
|
<!-- Fast forward -->
|
||||||
|
<Exec>n = *((size_t*)itInfo)</Exec>
|
||||||
|
<Loop>
|
||||||
|
<Break Condition="n != 0" />
|
||||||
|
<Exec>itInfo += sizeof(size_t)</Exec>
|
||||||
|
<Exec>itKeyVals += sizeof(size_t)</Exec>
|
||||||
|
</Loop>
|
||||||
|
<!-- Count Trailing Zeros -->
|
||||||
|
<Exec>
|
||||||
|
inc = n == 0
|
||||||
|
? 64
|
||||||
|
: (
|
||||||
|
63
|
||||||
|
- (((n & (~n + 1)) & 0x00000000FFFFFFFF) ? 32 : 0)
|
||||||
|
- (((n & (~n + 1)) & 0x0000FFFF0000FFFF) ? 16 : 0)
|
||||||
|
- (((n & (~n + 1)) & 0x00FF00FF00FF00FF) ? 8 : 0)
|
||||||
|
- (((n & (~n + 1)) & 0x0F0F0F0F0F0F0F0F) ? 4 : 0)
|
||||||
|
- (((n & (~n + 1)) & 0x3333333333333333) ? 2 : 0)
|
||||||
|
- (((n & (~n + 1)) & 0x5555555555555555) ? 1 : 0)
|
||||||
|
)
|
||||||
|
</Exec>
|
||||||
|
<Exec>itInfo += inc / 8</Exec>
|
||||||
|
<Exec>itKeyVals += inc / 8</Exec>
|
||||||
|
<!-- Fast forward -->
|
||||||
|
<Break Condition="(void*)itKeyVals == itEndKeyVals" />
|
||||||
|
<Item Name="[{itKeyVals->mData.first}]">itKeyVals->mData.second</Item>
|
||||||
|
<!-- <Item>itKeyVals->mData</Item> -->
|
||||||
|
<Exec>itInfo++ </Exec>
|
||||||
|
<Exec>itKeyVals++</Exec>
|
||||||
|
</Loop>
|
||||||
|
</CustomListItems>
|
||||||
|
</Expand>
|
||||||
|
</Synthetic>
|
||||||
|
<Item Name="[load_factor]" >float(mNumElements) / float(mMask + 1)</Item>
|
||||||
|
<Item Name="[max_load_factor]">$T2</Item>
|
||||||
|
<Item Name="[IsFlat]" >$T1</Item>
|
||||||
|
<Item Name="[hash_function]" >*(WrapHash<$T5>*)this,nd</Item>
|
||||||
|
<Item Name="[key_eq]" >*(WrapKeyEqual<$T6>*)this,nd</Item>
|
||||||
|
</Expand>
|
||||||
|
</Type>
|
||||||
</AutoVisualizer>
|
</AutoVisualizer>
|
||||||
|
Loading…
Reference in New Issue
Block a user