1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 12:23:53 +00:00

Trace frame count may be zero.

This commit is contained in:
Bartosz Taudul 2021-04-29 16:10:59 +02:00
parent 7cfaaf6310
commit 505656df5a
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -733,6 +733,8 @@ static void SetupSampling( int64_t& samplingPeriod )
s_ring[i].Read( &cnt, offset, sizeof( uint64_t ) );
offset += sizeof( uint64_t );
if( cnt > 0 )
{
auto trace = (uint64_t*)tracy_malloc( ( 1 + cnt ) * sizeof( uint64_t ) );
s_ring[i].Read( trace+1, offset, sizeof( uint64_t ) * cnt );
@ -784,6 +786,7 @@ static void SetupSampling( int64_t& samplingPeriod )
}
}
}
}
s_ring[i].Advance( hdr.size );
}
if( !traceActive.load( std::memory_order_relaxed) ) break;