mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 04:43:53 +00:00
Trace frame count may be zero.
This commit is contained in:
parent
7cfaaf6310
commit
505656df5a
@ -733,6 +733,8 @@ static void SetupSampling( int64_t& samplingPeriod )
|
|||||||
s_ring[i].Read( &cnt, offset, sizeof( uint64_t ) );
|
s_ring[i].Read( &cnt, offset, sizeof( uint64_t ) );
|
||||||
offset += sizeof( uint64_t );
|
offset += sizeof( uint64_t );
|
||||||
|
|
||||||
|
if( cnt > 0 )
|
||||||
|
{
|
||||||
auto trace = (uint64_t*)tracy_malloc( ( 1 + cnt ) * sizeof( uint64_t ) );
|
auto trace = (uint64_t*)tracy_malloc( ( 1 + cnt ) * sizeof( uint64_t ) );
|
||||||
s_ring[i].Read( trace+1, offset, sizeof( uint64_t ) * cnt );
|
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 );
|
s_ring[i].Advance( hdr.size );
|
||||||
}
|
}
|
||||||
if( !traceActive.load( std::memory_order_relaxed) ) break;
|
if( !traceActive.load( std::memory_order_relaxed) ) break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user