mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Handle postponed samples with SortedVector.
This commit is contained in:
@@ -4358,11 +4358,7 @@ void Worker::DoPostponedWork()
|
||||
auto ctx = GetContextSwitchData( td->id );
|
||||
if( ctx )
|
||||
{
|
||||
#ifdef NO_PARALLEL_SORT
|
||||
pdqsort_branchless( td->postponedSamples.begin(), td->postponedSamples.end(), [] ( const auto& l, const auto& r ) { return l.time.Val() < r.time.Val(); } );
|
||||
#else
|
||||
std::sort( std::execution::par_unseq, td->postponedSamples.begin(), td->postponedSamples.end(), [] ( const auto& l, const auto& r ) { return l.time.Val() < r.time.Val(); } );
|
||||
#endif
|
||||
td->postponedSamples.ensure_sorted();
|
||||
auto sit = td->postponedSamples.begin();
|
||||
auto cit = std::lower_bound( ctx->v.begin(), ctx->v.end(), sit->time.Val(), [] ( const auto& l, const auto& r ) { return (uint64_t)l.End() < (uint64_t)r; } );
|
||||
if( cit != ctx->v.end() )
|
||||
|
||||
Reference in New Issue
Block a user