mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Add memory pool selector to zone info window.
This commit is contained in:
parent
4394d396f5
commit
5af7f6ea0b
@ -7192,11 +7192,32 @@ void View::DrawZoneInfoWindow()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto& mem = m_worker.GetMemoryDefault();
|
|
||||||
if( !mem.data.empty() )
|
|
||||||
{
|
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
auto& memNameMap = m_worker.GetMemNameMap();
|
||||||
|
if( memNameMap.size() > 1 )
|
||||||
|
{
|
||||||
|
ImGui::AlignTextToFramePadding();
|
||||||
|
TextDisabledUnformatted( ICON_FA_ARCHIVE " Memory pool:" );
|
||||||
|
ImGui::SameLine();
|
||||||
|
if( ImGui::BeginCombo( "##memoryPool", m_zoneInfoMemPool == 0 ? "Default allocator" : m_worker.GetString( m_zoneInfoMemPool ) ) )
|
||||||
|
{
|
||||||
|
for( auto& v : memNameMap )
|
||||||
|
{
|
||||||
|
if( ImGui::Selectable( v.first == 0 ? "Default allocator" : m_worker.GetString( v.first ) ) )
|
||||||
|
{
|
||||||
|
m_zoneInfoMemPool = v.first;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ImGui::EndCombo();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
auto& mem = m_worker.GetMemoryNamed( m_zoneInfoMemPool );
|
||||||
|
if( mem.data.empty() )
|
||||||
|
{
|
||||||
|
TextDisabledUnformatted( "No memory events." );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if( !mem.plot )
|
if( !mem.plot )
|
||||||
{
|
{
|
||||||
ImGui::Text( "Please wait, computing data..." );
|
ImGui::Text( "Please wait, computing data..." );
|
||||||
@ -7301,7 +7322,7 @@ void View::DrawZoneInfoWindow()
|
|||||||
|
|
||||||
ListMemData( v, []( auto v ) {
|
ListMemData( v, []( auto v ) {
|
||||||
ImGui::Text( "0x%" PRIx64, v->Ptr() );
|
ImGui::Text( "0x%" PRIx64, v->Ptr() );
|
||||||
}, nullptr, m_allocTimeRelativeToZone ? ev.Start() : -1, 0 );
|
}, nullptr, m_allocTimeRelativeToZone ? ev.Start() : -1, m_zoneInfoMemPool );
|
||||||
ImGui::TreePop();
|
ImGui::TreePop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -399,6 +399,7 @@ private:
|
|||||||
bool m_allocTimeRelativeToZone = true;
|
bool m_allocTimeRelativeToZone = true;
|
||||||
bool m_ctxSwitchTimeRelativeToZone = true;
|
bool m_ctxSwitchTimeRelativeToZone = true;
|
||||||
bool m_messageTimeRelativeToZone = true;
|
bool m_messageTimeRelativeToZone = true;
|
||||||
|
uint64_t m_zoneInfoMemPool = 0;
|
||||||
|
|
||||||
ShortcutAction m_shortcut = ShortcutAction::None;
|
ShortcutAction m_shortcut = ShortcutAction::None;
|
||||||
Namespace m_namespace = Namespace::Short;
|
Namespace m_namespace = Namespace::Short;
|
||||||
|
Loading…
Reference in New Issue
Block a user