Save/load code symbol map.

This commit is contained in:
Bartosz Taudul 2021-06-19 19:58:16 +02:00
parent ee13d3fa44
commit 53111f9dd9
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -1738,6 +1738,15 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
if( fileVer >= FileVersion( 0, 7, 9 ) )
{
f.Read( sz );
m_data.codeSymbolMap.reserve( sz );
for( uint64_t i=0; i<sz; i++ )
{
uint64_t v1, v2;
f.Read2( v1, v2 );
m_data.codeSymbolMap.emplace( v1, v2 );
}
f.Read( sz );
m_data.hwSamples.reserve( sz );
for( uint64_t i=0; i<sz; i++ )
@ -7712,6 +7721,14 @@ void Worker::Write( FileWrite& f, bool fiDict )
}
}
sz = m_data.codeSymbolMap.size();
f.Write( &sz, sizeof( sz ) );
for( auto& v : m_data.codeSymbolMap )
{
f.Write( &v.first, sizeof( v.first ) );
f.Write( &v.second, sizeof( v.second ) );
}
sz = m_data.hwSamples.size();
f.Write( &sz, sizeof( sz ) );
for( auto& v : m_data.hwSamples )