From f5df9f9c243d5e9bfce8e297857adde177733b03 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 21 Mar 2026 23:36:15 +0100 Subject: [PATCH] Remove dead code. --- profiler/src/profiler/TracyView_Utility.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/profiler/src/profiler/TracyView_Utility.cpp b/profiler/src/profiler/TracyView_Utility.cpp index 1a37fc62..fe6c4d77 100644 --- a/profiler/src/profiler/TracyView_Utility.cpp +++ b/profiler/src/profiler/TracyView_Utility.cpp @@ -998,12 +998,6 @@ nlohmann::json View::GetCallstackJson( const CallstackFrameId* data, size_t size return json; } -struct CallstackRoot -{ - unordered_flat_set stacks; - size_t maxLocalFrames; -}; - std::vector View::ReconstructZoneCallstack( const ZoneEvent& ev ) const { constexpr int SampleLimit = 10000; @@ -1016,7 +1010,7 @@ std::vector View::ReconstructZoneCallstack( const ZoneEvent& e auto end = std::lower_bound( it, td->samples.end(), m_worker.GetZoneEnd( ev ), [] ( const auto& l, const auto& r ) { return l.time.Val() < r; } ); if( std::distance( it, end ) > SampleLimit ) end = it + SampleLimit; - unordered_flat_map roots; + unordered_flat_map> roots; while( it != end ) { auto stack = it->callstack.Val(); @@ -1025,12 +1019,12 @@ std::vector View::ReconstructZoneCallstack( const ZoneEvent& e auto rit = roots.find( root ); if( rit == roots.end() ) { - roots.emplace( root, CallstackRoot { { stack } } ); + roots.emplace( root, unordered_flat_set { stack } ); } else { - auto sit = rit->second.stacks.find( stack ); - if( sit == rit->second.stacks.end() ) rit->second.stacks.emplace( stack ); + auto sit = rit->second.find( stack ); + if( sit == rit->second.end() ) rit->second.emplace( stack ); } ++it; } @@ -1040,7 +1034,7 @@ std::vector View::ReconstructZoneCallstack( const ZoneEvent& e for( auto& root : roots ) { size_t max = 0; - for( auto& stack : root.second.stacks ) + for( auto& stack : root.second ) { size_t local = 0; auto& cs = m_worker.GetCallstack( stack ); @@ -1061,7 +1055,7 @@ std::vector View::ReconstructZoneCallstack( const ZoneEvent& e if( max > globalMax ) { globalMax = max; - stacks = std::move( root.second.stacks ); + stacks = std::move( root.second ); } } if( stacks.empty() ) return ret;