Save/load application info.

This commit is contained in:
Bartosz Taudul 2019-07-12 18:45:35 +02:00
parent 8c9d46ef29
commit 2e774f4626
2 changed files with 15 additions and 1 deletions

View File

@ -7,7 +7,7 @@ namespace Version
{
enum { Major = 0 };
enum { Minor = 4 };
enum { Patch = 10 };
enum { Patch = 11 };
}
}

View File

@ -1237,6 +1237,16 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
}
}
if( fileVer >= FileVersion( 0, 4, 11 ) )
{
f.Read( sz );
if( sz > 0 )
{
m_data.appInfo.reserve_exact( sz, m_slab );
f.Read( m_data.appInfo.data(), sizeof( m_data.appInfo[0] ) * sz );
}
}
if( fileVer >= FileVersion( 0, 4, 9 ) )
{
s_loadProgress.subTotal.store( 0, std::memory_order_relaxed );
@ -4428,6 +4438,10 @@ void Worker::Write( FileWrite& f )
f.Write( frame.second->data, sizeof( CallstackFrame ) * frame.second->size );
}
sz = m_data.appInfo.size();
f.Write( &sz, sizeof( sz ) );
f.Write( m_data.appInfo.data(), sizeof( m_data.appInfo[0] ) * sz );
sz = m_data.frameImage.size();
f.Write( &sz, sizeof( sz ) );
for( auto& fi : m_data.frameImage )