From 3305ea2775b6de84743f9ef5c27369d6b2d903e4 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 20 Jun 2021 00:45:16 +0200 Subject: [PATCH] Keep raw hw sample data visually separate. --- server/TracySourceView.cpp | 3 +++ server/TracySourceView.hpp | 26 +++++++++++++------------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index 3f2c293a..fd7a4c1f 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -81,6 +81,8 @@ static constexpr const char* s_CostName[] = { "Cache miss" }; +static constexpr SourceView::CostType s_costSeparateAfter = SourceView::CostType::SlowCache; + static size_t CountHwSamples( const SortedVector& vec, const Range& range ) { @@ -1257,6 +1259,7 @@ void SourceView::RenderSymbolView( Worker& worker, View& view ) for( auto& v : s_CostName ) { if( ImGui::Selectable( v, idx == (int)m_cost ) ) m_cost = (CostType)idx; + if( (CostType)idx == s_costSeparateAfter ) ImGui::Separator(); idx++; } ImGui::EndCombo(); diff --git a/server/TracySourceView.hpp b/server/TracySourceView.hpp index ef64af71..4753971d 100644 --- a/server/TracySourceView.hpp +++ b/server/TracySourceView.hpp @@ -35,6 +35,19 @@ public: NUMBER_OF_ENTRIES }; + enum class CostType + { + SampleCount, + SlowBranches, + SlowCache, + Cycles, + Retirements, + BranchesTaken, + BranchMiss, + CacheAccess, + CacheMiss + }; + private: struct AsmOpParams { @@ -113,19 +126,6 @@ private: } }; - enum class CostType - { - SampleCount, - SlowBranches, - SlowCache, - Cycles, - Retirements, - BranchesTaken, - BranchMiss, - CacheAccess, - CacheMiss - }; - public: using GetWindowCallback = void*(*)();