mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 04:43:53 +00:00
DrawAllocList() is memory.
This commit is contained in:
parent
c2728fde04
commit
5ed7d71927
@ -3749,28 +3749,6 @@ void View::DrawRangeEntry( Range& range, const char* label, uint32_t color, cons
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::DrawAllocList()
|
|
||||||
{
|
|
||||||
const auto scale = GetScale();
|
|
||||||
ImGui::SetNextWindowSize( ImVec2( 1100 * scale, 500 * scale ), ImGuiCond_FirstUseEver );
|
|
||||||
ImGui::Begin( "Allocations list", &m_memInfo.showAllocList );
|
|
||||||
if( ImGui::GetCurrentWindowRead()->SkipItems ) { ImGui::End(); return; }
|
|
||||||
|
|
||||||
std::vector<const MemEvent*> data;
|
|
||||||
auto basePtr = m_worker.GetMemoryNamed( m_memInfo.pool ).data.data();
|
|
||||||
data.reserve( m_memInfo.allocList.size() );
|
|
||||||
for( auto& idx : m_memInfo.allocList )
|
|
||||||
{
|
|
||||||
data.emplace_back( basePtr + idx );
|
|
||||||
}
|
|
||||||
|
|
||||||
TextFocused( "Number of allocations:", RealToString( m_memInfo.allocList.size() ) );
|
|
||||||
ListMemData( data, []( auto v ) {
|
|
||||||
ImGui::Text( "0x%" PRIx64, v->Ptr() );
|
|
||||||
}, "##allocations", -1, m_memInfo.pool );
|
|
||||||
ImGui::End();
|
|
||||||
}
|
|
||||||
|
|
||||||
void View::CrashTooltip()
|
void View::CrashTooltip()
|
||||||
{
|
{
|
||||||
auto& crash = m_worker.GetCrashEvent();
|
auto& crash = m_worker.GetCrashEvent();
|
||||||
|
@ -897,4 +897,26 @@ void View::ListMemData( std::vector<const MemEvent*>& vec, std::function<void(co
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void View::DrawAllocList()
|
||||||
|
{
|
||||||
|
const auto scale = GetScale();
|
||||||
|
ImGui::SetNextWindowSize( ImVec2( 1100 * scale, 500 * scale ), ImGuiCond_FirstUseEver );
|
||||||
|
ImGui::Begin( "Allocations list", &m_memInfo.showAllocList );
|
||||||
|
if( ImGui::GetCurrentWindowRead()->SkipItems ) { ImGui::End(); return; }
|
||||||
|
|
||||||
|
std::vector<const MemEvent*> data;
|
||||||
|
auto basePtr = m_worker.GetMemoryNamed( m_memInfo.pool ).data.data();
|
||||||
|
data.reserve( m_memInfo.allocList.size() );
|
||||||
|
for( auto& idx : m_memInfo.allocList )
|
||||||
|
{
|
||||||
|
data.emplace_back( basePtr + idx );
|
||||||
|
}
|
||||||
|
|
||||||
|
TextFocused( "Number of allocations:", RealToString( m_memInfo.allocList.size() ) );
|
||||||
|
ListMemData( data, []( auto v ) {
|
||||||
|
ImGui::Text( "0x%" PRIx64, v->Ptr() );
|
||||||
|
}, "##allocations", -1, m_memInfo.pool );
|
||||||
|
ImGui::End();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user