Track trace version in worker.

This commit is contained in:
Bartosz Taudul 2018-07-29 15:33:48 +02:00
parent 13509c14f1
commit 9f13475b52
2 changed files with 5 additions and 0 deletions

View File

@ -199,6 +199,7 @@ Worker::Worker( const char* addr )
, m_pendingThreads( 0 )
, m_pendingSourceLocation( 0 )
, m_pendingCallstackFrames( 0 )
, m_traceVersion( CurrentVersion )
{
m_data.sourceLocationExpand.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" );
memcpy( &m_delay, hdr, sizeof( m_delay ) );
}
m_traceVersion = fileVer;
if( fileVer <= FileVersion( 0, 3, 1 ) )
{

View File

@ -232,6 +232,7 @@ public:
void Shutdown() { m_shutdown.store( true, std::memory_order_relaxed ); }
void Write( FileWrite& f );
int GetTraceVersion() const { return m_traceVersion; }
static const LoadProgress& GetLoadProgress() { return s_loadProgress; }
@ -377,6 +378,8 @@ private:
DataBlock m_data;
MbpsBlock m_mbpsData;
int m_traceVersion;
static LoadProgress s_loadProgress;
};