From 59293b18506ad4a4d20c76add1f3f54ede2c2f56 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 18 Aug 2018 19:44:29 +0200 Subject: [PATCH] Enable support for restrict time in call stack tree. --- server/TracyView.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index d1e6a8e2..5ac1fc9a 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -6479,9 +6479,13 @@ std::vector View::GetCallstackFrameTree( const MemData& mem std::vector> paths; paths.resize( m_worker.GetCallstackPayloadCount() ); + const auto zvMid = m_zvStart + ( m_zvEnd - m_zvStart ) / 2; + for( auto& ev : mem.data ) { if( ev.csAlloc == 0 ) continue; + if( m_memInfo.restrictTime && ev.timeAlloc >= zvMid ) continue; + auto& path = paths[ev.csAlloc]; if( !path.empty() ) {