1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Allocation times may be displayed relative to zone start.

This commit is contained in:
Bartosz Taudul 2019-03-17 16:53:09 +01:00
parent d2cca5dc3f
commit b6ccb9d686
2 changed files with 4 additions and 1 deletions

View File

@ -4453,6 +4453,8 @@ void View::DrawZoneInfoWindow()
if( ImGui::TreeNode( "Allocations list" ) ) if( ImGui::TreeNode( "Allocations list" ) )
{ {
SmallCheckbox( "Allocation times relative to zone start", &m_allocTimeRelativeToZone );
std::vector<const MemEvent*> v; std::vector<const MemEvent*> v;
v.reserve( nAlloc + nFree ); v.reserve( nAlloc + nFree );
@ -4480,7 +4482,7 @@ void View::DrawZoneInfoWindow()
ListMemData<decltype( v.begin() )>( v.begin(), v.end(), []( auto& v ) { ListMemData<decltype( v.begin() )>( v.begin(), v.end(), []( auto& v ) {
ImGui::Text( "0x%" PRIx64, (*v)->ptr ); ImGui::Text( "0x%" PRIx64, (*v)->ptr );
} ); }, nullptr, m_allocTimeRelativeToZone ? ev.start : -1 );
ImGui::TreePop(); ImGui::TreePop();
} }
} }

View File

@ -268,6 +268,7 @@ private:
bool m_showCallstackFrameAddress = false; bool m_showCallstackFrameAddress = false;
bool m_showUnknownFrames = true; bool m_showUnknownFrames = true;
bool m_groupChildrenLocations = false; bool m_groupChildrenLocations = false;
bool m_allocTimeRelativeToZone = true;
ShortcutAction m_shortcut = ShortcutAction::None; ShortcutAction m_shortcut = ShortcutAction::None;
Namespace m_namespace = Namespace::Full; Namespace m_namespace = Namespace::Full;