Save/load external process names.

This commit is contained in:
Bartosz Taudul 2019-08-16 19:24:38 +02:00
parent fe7f56b022
commit ccaf92afc4

View File

@ -494,6 +494,21 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
}
}
if( fileVer >= FileVersion( 0, 5, 3 ) )
{
f.Read( sz );
for( uint64_t i=0; i<sz; i++ )
{
uint64_t id, ptr;
f.Read2( id, ptr );
auto it = pointerMap.find( ptr );
if( it != pointerMap.end() )
{
m_data.externalNames.emplace( id, it->second );
}
}
}
if( fileVer >= FileVersion( 0, 4, 4 ) )
{
f.Read( sz );
@ -4675,6 +4690,15 @@ void Worker::Write( FileWrite& f )
f.Write( &ptr, sizeof( ptr ) );
}
sz = m_data.externalNames.size();
f.Write( &sz, sizeof( sz ) );
for( auto& v : m_data.externalNames )
{
f.Write( &v.first, sizeof( v.first ) );
uint64_t ptr = (uint64_t)v.second;
f.Write( &ptr, sizeof( ptr ) );
}
sz = m_data.threadExpand.size();
f.Write( &sz, sizeof( sz ) );
f.Write( m_data.threadExpand.data(), sz * sizeof( uint64_t ) );