diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 28fe84aa..0b4161de 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -4453,6 +4453,8 @@ void View::DrawZoneInfoWindow() if( ImGui::TreeNode( "Allocations list" ) ) { + SmallCheckbox( "Allocation times relative to zone start", &m_allocTimeRelativeToZone ); + std::vector v; v.reserve( nAlloc + nFree ); @@ -4480,7 +4482,7 @@ void View::DrawZoneInfoWindow() ListMemData( v.begin(), v.end(), []( auto& v ) { ImGui::Text( "0x%" PRIx64, (*v)->ptr ); - } ); + }, nullptr, m_allocTimeRelativeToZone ? ev.start : -1 ); ImGui::TreePop(); } } diff --git a/server/TracyView.hpp b/server/TracyView.hpp index 2cb848fa..3fe83853 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -268,6 +268,7 @@ private: bool m_showCallstackFrameAddress = false; bool m_showUnknownFrames = true; bool m_groupChildrenLocations = false; + bool m_allocTimeRelativeToZone = true; ShortcutAction m_shortcut = ShortcutAction::None; Namespace m_namespace = Namespace::Full;