mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Track trace version in worker.
This commit is contained in:
parent
13509c14f1
commit
9f13475b52
@ -199,6 +199,7 @@ Worker::Worker( const char* addr )
|
|||||||
, m_pendingThreads( 0 )
|
, m_pendingThreads( 0 )
|
||||||
, m_pendingSourceLocation( 0 )
|
, m_pendingSourceLocation( 0 )
|
||||||
, m_pendingCallstackFrames( 0 )
|
, m_pendingCallstackFrames( 0 )
|
||||||
|
, m_traceVersion( CurrentVersion )
|
||||||
{
|
{
|
||||||
m_data.sourceLocationExpand.push_back( 0 );
|
m_data.sourceLocationExpand.push_back( 0 );
|
||||||
m_data.threadExpand.push_back( 0 );
|
m_data.threadExpand.push_back( 0 );
|
||||||
@ -244,6 +245,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
|||||||
static_assert( sizeof( m_delay ) == sizeof( hdr ), "Size mismatch" );
|
static_assert( sizeof( m_delay ) == sizeof( hdr ), "Size mismatch" );
|
||||||
memcpy( &m_delay, hdr, sizeof( m_delay ) );
|
memcpy( &m_delay, hdr, sizeof( m_delay ) );
|
||||||
}
|
}
|
||||||
|
m_traceVersion = fileVer;
|
||||||
|
|
||||||
if( fileVer <= FileVersion( 0, 3, 1 ) )
|
if( fileVer <= FileVersion( 0, 3, 1 ) )
|
||||||
{
|
{
|
||||||
|
@ -232,6 +232,7 @@ public:
|
|||||||
void Shutdown() { m_shutdown.store( true, std::memory_order_relaxed ); }
|
void Shutdown() { m_shutdown.store( true, std::memory_order_relaxed ); }
|
||||||
|
|
||||||
void Write( FileWrite& f );
|
void Write( FileWrite& f );
|
||||||
|
int GetTraceVersion() const { return m_traceVersion; }
|
||||||
|
|
||||||
static const LoadProgress& GetLoadProgress() { return s_loadProgress; }
|
static const LoadProgress& GetLoadProgress() { return s_loadProgress; }
|
||||||
|
|
||||||
@ -377,6 +378,8 @@ private:
|
|||||||
DataBlock m_data;
|
DataBlock m_data;
|
||||||
MbpsBlock m_mbpsData;
|
MbpsBlock m_mbpsData;
|
||||||
|
|
||||||
|
int m_traceVersion;
|
||||||
|
|
||||||
static LoadProgress s_loadProgress;
|
static LoadProgress s_loadProgress;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user