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