Track zone id for verification purposes.

This commit is contained in:
Bartosz Taudul 2019-01-14 22:23:24 +01:00
parent a2fd09d938
commit 970108fbbf
2 changed files with 7 additions and 0 deletions

View File

@ -811,6 +811,7 @@ Profiler::Profiler()
, m_shutdownFinished( false )
, m_sock( nullptr )
, m_noExit( false )
, m_zoneId( 1 )
, m_stream( LZ4_createStream() )
, m_buffer( (char*)tracy_malloc( TargetFrameSize*3 ) )
, m_bufferOffset( 0 )

View File

@ -126,6 +126,11 @@ public:
#endif
}
tracy_force_inline uint32_t GetNextZoneId()
{
return m_zoneId.fetch_add( 1, std::memory_order_relaxed );
}
static tracy_force_inline void SendFrameMark()
{
#ifdef TRACY_ON_DEMAND
@ -431,6 +436,7 @@ private:
std::atomic<bool> m_shutdownFinished;
Socket* m_sock;
bool m_noExit;
std::atomic<uint32_t> m_zoneId;
LZ4_stream_t* m_stream;
char* m_buffer;