Workaround issues with sample order.

This commit is contained in:
Bartosz Taudul 2020-08-18 21:53:52 +02:00
parent 411ca81786
commit 7cf3b0b004

View File

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