From 044b7e1522a0deb218aae364717b38babf3850b5 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 6 Feb 2019 21:45:26 +0100 Subject: [PATCH] Add function name grouping controls. --- server/TracyView.cpp | 2 ++ server/TracyView.hpp | 3 +++ 2 files changed, 5 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index cfc80ab5..1cfb24da 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -8037,6 +8037,7 @@ void View::DrawMemory() if( ImGui::TreeNode( "Bottom-up call stack tree" ) ) #endif { + ImGui::Checkbox( "Group by function name", &m_groupCallstackTreeByNameBottomUp ); ImGui::TextDisabled( "Press ctrl key to display allocation info tooltip." ); ImGui::TextDisabled( "Right click on function name to display allocations list. Right click on file name to open source file." ); @@ -8056,6 +8057,7 @@ void View::DrawMemory() if( ImGui::TreeNode( "Top-down call stack tree" ) ) #endif { + ImGui::Checkbox( "Group by function name", &m_groupCallstackTreeByNameTopDown ); ImGui::TextDisabled( "Press ctrl key to display allocation info tooltip." ); ImGui::TextDisabled( "Right click on function name to display allocations list. Right click on file name to open source file." ); diff --git a/server/TracyView.hpp b/server/TracyView.hpp index eed950ce..7724818f 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -295,6 +295,9 @@ private: float m_notificationTime = 0; std::string m_notificationText; + bool m_groupCallstackTreeByNameBottomUp = false; + bool m_groupCallstackTreeByNameTopDown = false; + struct FindZone { enum : uint64_t { Unselected = std::numeric_limits::max() - 1 }; enum class GroupBy : int { Thread, UserText, Callstack };