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*(*)();