From 7cf3b0b0044bc32517b0b402f2f97613b8f526af Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 18 Aug 2020 21:53:52 +0200 Subject: [PATCH] Workaround issues with sample order. --- server/TracyWorker.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 14b32268..c9851688 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -1661,6 +1661,8 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks ) for( auto& t : m_data.threads ) { if( m_shutdown.load( std::memory_order_relaxed ) ) return; + // TODO remove when proper sample order is achieved during capture + pdqsort_branchless( t->samples.begin(), t->samples.end(), [] ( const auto& lhs, const auto& rhs ) { return lhs.time.Val() < rhs.time.Val(); } ); for( auto& sd : t->samples ) { gcnt += AddGhostZone( GetCallstack( sd.callstack.Val() ), &t->ghostZones, sd.time.Val() );