Simplify support for 0.2 traces.

This commit is contained in:
Bartosz Taudul 2019-02-14 01:13:11 +01:00
parent bd1c1d044b
commit 080873003b

View File

@ -869,18 +869,14 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
}
}
bool reconstructMemAllocPlot = false;
// Support pre-0.3 traces
if( fileVer == 0 && f.IsEOF() )
{
s_loadProgress.total.store( 0, std::memory_order_relaxed );
m_loadTime = std::chrono::duration_cast<std::chrono::nanoseconds>( std::chrono::high_resolution_clock::now() - loadStart ).count();
return;
}
if( fileVer == 0 && f.IsEOF() ) goto finishLoading;
s_loadProgress.subTotal.store( 0, std::memory_order_relaxed );
s_loadProgress.progress.store( LoadProgress::Memory, std::memory_order_relaxed );
f.Read( sz );
bool reconstructMemAllocPlot = false;
if( eventMask & EventType::Memory )
{
m_data.memory.data.reserve_exact( sz );